backtrace: fix segfault in tcmalloc.

The print function is only called when we're about to crash anyway,
and the datamember 'foo' is allocated by ptmalloc, not tcmalloc. Freeing
it via tcmalloc causes its own crash which pollutes our debugging and
incorrectly sticks tcmalloc into the stack. So, just don't free.
This commit is contained in:
Greg Farnum 2010-08-19 12:01:11 -07:00
parent b1350c905c
commit 1ac5675500

View File

@ -43,7 +43,6 @@ void BackTrace::print(std::ostream& out)
function[sz-1] = 0;
}
out << " " << (i-skip+1) << ": (" << function << end << std::endl;
free(foo);
//fprintf(out, " %s:%s\n", stack.strings[i], function);
} else {
// didn't find the mangled name, just print the whole line