On (12/31/10 18:28), wkq5325 wrote: > Sorry, it can't work with > > name = NULL; >
Hm, could you please provide the whole gdb backtrace (bt)?
I thought it will work. We don't have pointer initialization in .ctor
so it could be anything and could pass `if (name)' check (which will
cause freeing of unallocated memory).
Do we have the exact stack traces for patched and unpatched versions?
Happy new year!
> Same problem like before.
>
> >No, changing it to `if (!name)' will introduce bug.
> >Could you please try the following one:
> >
> >---
> >
> > perf/perf.cpp | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> >diff --git a/perf/perf.cpp b/perf/perf.cpp
> >index c9758ff..2f2686b 100644
> >--- a/perf/perf.cpp
> >+++ b/perf/perf.cpp
> >@@ -177,6 +177,7 @@ void perf_event::set_cpu(int _cpu)
> >
> > perf_event::perf_event(const char *event_name, int _cpu, int buffer_size)
> > {
> >+ name = NULL;
> > set_event_name(event_name);
> > perf_fd = -1;
> > bufsize = buffer_size;
> >
Sergey
pgpsMlPwBEXFA.pgp
Description: PGP signature
_______________________________________________ Discuss mailing list [email protected] http://lists.lesswatts.org/listinfo/discuss
