tcmalloc segfault during a free, without saying anything
GoogleCodeExporter opened this issue · 1 comments
GoogleCodeExporter commented
I can't help for the moment how I managed to produce the bug (2 times).
I am opening an issue because normaly tcmalloc say something nice like
"Attempt to free invalid pointer" , so perhaps tcmalloc is missing some
tests during the ReleaseToCentralCache function.
Here is the backtrack of gdb :
gdb :
(gdb) bt
#0 tcmalloc::ThreadCache::ReleaseToCentralCache (this=0x22961e8,
src=0x2296228, cl=<value optimized out>, N=32) at src/linked_list.h:42
#1 0x00007f262f35e873 in tcmalloc::ThreadCache::ListTooLong
(this=0x3bbfa68, list=0x3bbfa68, cl=0) at src/thread_cache.cc:180
#2 0x00007f262f36c370 in tc_free (ptr=0x3bbfa68) at src/thread_cache.h:359
#3 0x0000000000406625 in i_am_doing_a_free_in_my_soft (data=0x3fe21a0) at
../layer4.c:416
What version of the product are you using? On what operating system?
ubuntu 9.10 64bit tcmalloc1.5 & libunwind0.99 with stackpointers
Please provide any additional information below.
I do every minute a call to MallocExtension_ReleaseFreeMemory();
I've kept the core dump file.
Original issue reported on code.google.com by laurent....@gmail.com
on 30 Mar 2010 at 3:33
GoogleCodeExporter commented
Unfortunately, we can't print a nice error message for every type of memory
corruption that we see -- some we can notice, but some would just be too
expensive to
check for all the time, and the detected corruption would be so far away from
where
the corruption happened, we wouldn't be able to say anything useful anyway. I
think
in general to figure out why a memory allocation operation is crashing, it's
much
more useful to use a dedicated tool, such as valgrind, or tcmalloc's
tcmalloc_debug
library.
This is almost certainly due to a memory management bug in your code, so I'm
going to
close the bug. If it turns out there's something related to tcmalloc behavior
in
here, though, feel free to reopen it.
Original comment by csilv...@gmail.com
on 30 Mar 2010 at 9:35
- Changed state: WontFix
- Added labels: Priority-Medium, Type-Defect