DavidMorre / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Null ptr dereference inside SLL_Next when destroying thread cache #231

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
no clue, it happens somewhat randomly, but enough that by starting my
program in GDB and running it 15 or so times, I can get it to crash, with
the attached backtrace as result

What is the expected output? What do you see instead?
no segfault

What version of the product are you using? On what operating system?
google-perftools-1.5, on Gentoo Linux, glibc-2.11, gcc-4.4.3, binutils-2.20.1

Please provide any additional information below.
I'm dabbling in lock-free lists and one of my implementations tests (just a
few threads inserting/removing stuff from a shared list) works fine with
tcmalloc most of the time, but then sometimes it just crashes, I recompiled
the app and google-perftools with -O0 -ggdb3 and got the attached
backtraces (the first is without -O0, the second with optimizations disabled).
Judging from the bt it tries to dereference a NULL ptr inside SLL_Next...
If you need more info just ask and I'll get back to you.
Best regards, Luca Longinotti.

Original issue reported on code.google.com by llongi...@gmail.com on 8 Apr 2010 at 12:38

Attachments:

GoogleCodeExporter commented 9 years ago
This means there's memory corruption in your program somewhere -- perhaps heap 
corruption, or stack overflow, or assigning to freed memory, or a double-free, 
or ...

Try running with -ltcmalloc_debug to help nail down where the problem might be, 
or 
using another tool such as valgrind.

Original comment by csilv...@gmail.com on 8 Apr 2010 at 1:07