lkml.org 
[lkml]   [2011]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] perf: fix buffer overflow error caused by specifying all tracepoints with -e option
    Em Thu, Jan 06, 2011 at 05:39:22PM +0800, Han Pingtian escreveu:
    > I found when specifying all tracepoints with -e to one of subcommand,
    > such as 'top', the program will trigger a buffer overflow error, like
    > this:
    >
    > *** buffer overflow detected ***: ./perf terminated
    > ======= Backtrace: =========
    <SNIP>
    > ....
    > The tracepoints are separated by comma, something like this:
    >
    > perf top -e ...,kmem:kmalloc,kmem:kfree,kmem:kmem_cache_free,...
    >
    > This comment will fix this problem.
    >
    > The root reason of this problem is that store_event_type() is called
    > with all the events, and will overflow the 'filename' at
    >
    > strncat(filename, orgname, strlen(orgname));
    >
    > The comments will try to call store_event_type() when the event name has
    > been found out.

    s/comments/patch/g, right? Other than that looks fine, applying.

    - Arnaldo


    \
     
     \ /
      Last update: 2011-01-06 19:33    [W:0.020 / U:2.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site