|
From: Nicholas N. <nj...@ca...> - 2004-04-09 22:39:30
|
On Fri, 9 Apr 2004, G B wrote: > --- Nicholas Nethercote <nj...@ca...> wrote: > > > Is this valgrind finding a bug in > > > a) itself? > > > b) libc? > > > c) my program? > > > > Maybe b, maybe c. A longer stack trace (eg. > > --num-callers=20) will > > hopefully make it clearer. > > ==2872== Invalid free() / delete / delete[] > ==2872== at 0x7501CDEC: free (in > /usr/lib/valgrind/vgpreload_addrcheck.so) > ==2872== by 0x7540B9B3: (within /lib/libc-2.3.3.so) > ==2872== by 0x7540B6F9: __libc_freeres (in > /lib/libc-2.3.3.so) > ==2872== by 0x75018BBE: (within > /usr/lib/valgrind/vg_inject.so) > ==2872== by 0x7533104A: exit (in > /lib/libc-2.3.3.so) > ==2872== by 0x75106C19: processEventsAndTimeouts > (in /usr/lib/libglut.so.3.7.1) > ==2872== by 0x8F: ??? > ==2872== Address 0x759D0818 is not stack'd, malloc'd > or free'd > > The above was obtained with --num-callers=20. Any > ideas what could be lurking at 0x8F? Stack-walking is not always reliable, I think Valgrind's getting confused here, and wouldn't pay too much attention to the 0x8f. Try with --run-libc-freeres=no. If you don't get an error, then I think it shows that the problem is with glibc -- libc-freeres is a glibc routine that frees up all glibc's memory. N |