summaryrefslogtreecommitdiffstats
path: root/src/common/BackTrace.cc
diff options
context:
space:
mode:
authorGreg Farnum <gregf@hq.newdream.net>2010-08-19 21:01:11 +0200
committerGreg Farnum <gregf@hq.newdream.net>2010-08-20 22:46:25 +0200
commit1ac5675500182e5e908445d5d2a94e6e8419580f (patch)
tree99995e874e8651005d9a4e3b3d17fa3009f2bfbf /src/common/BackTrace.cc
parentmds: fix pick_inode_snap (diff)
downloadceph-1ac5675500182e5e908445d5d2a94e6e8419580f.tar.xz
ceph-1ac5675500182e5e908445d5d2a94e6e8419580f.zip
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.
Diffstat (limited to 'src/common/BackTrace.cc')
-rw-r--r--src/common/BackTrace.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/common/BackTrace.cc b/src/common/BackTrace.cc
index e8a7542d039..e6d1f74ac7c 100644
--- a/src/common/BackTrace.cc
+++ b/src/common/BackTrace.cc
@@ -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