Closed GoogleCodeExporter closed 9 years ago
Hmm, this is a tricky one. tcmalloc doesn't recurse, and doesn't provide any
inlineable API in normal usage, so I don't think tcmalloc is contributing to the
stack overflow, if indeed that's what's happening here. However, it's entirely
plausible that tcmalloc would handle stack overflow differently than libc, and
corruptions that are a big problem in one implementation may be a smaller in
another
(and vice versa).
However, it would be strange that a stack overflow would cause a program to
slow down
but not crash, so it may be something else going on entirely.
I think there are tools to help detect stack overflow, some built into gcc (if
you're
using that): -fstack-protector-all, and also a flag that will warn at compile
time if
the stack is too big (I don't know how it handles alloca and equivalent). See,
e.g.,
http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
You may also want to check out mudflap:
http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging
Sounds like a very frustrating problem. :-( Good luck tracking it down!
Original comment by csilv...@gmail.com
on 26 Jun 2009 at 3:25
Original issue reported on code.google.com by
donavanb...@gmail.com
on 26 Jun 2009 at 8:10