lkml.org 
[lkml]   [2013]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/6] perf evlist: fix use of uninitialized variable
    Date
    Fixes valgrind complaint:
    ==1870== Syscall param write(buf) points to uninitialised byte(s)
    ==1870== at 0x4E3F5B0: __write_nocancel (in /lib64/libpthread-2.14.90.so)
    ==1870== by 0x449D7C: perf_evlist__start_workload (evlist.c:846)
    ==1870== by 0x427BC1: cmd_record (builtin-record.c:561)
    ==1870== by 0x419D72: run_builtin (perf.c:319)
    ==1870== by 0x4195F2: main (perf.c:376)
    ==1870== Address 0x7feffcdd7 is on thread 1's stack

    Signed-off-by: David Ahern <dsahern@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    ---
    tools/perf/util/evlist.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
    index 4a901be..d8f34e0 100644
    --- a/tools/perf/util/evlist.c
    +++ b/tools/perf/util/evlist.c
    @@ -838,7 +838,7 @@ out_close_ready_pipe:
    int perf_evlist__start_workload(struct perf_evlist *evlist)
    {
    if (evlist->workload.cork_fd > 0) {
    - char bf;
    + char bf = 0;
    int ret;
    /*
    * Remove the cork, let it rip!
    --
    1.7.10.1


    \
     
     \ /
      Last update: 2013-07-02 22:21    [W:5.342 / U:0.392 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site