mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
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:
parent
0d5829e03b
commit
b18ee3721c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user