]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
backtrace: fix segfault in tcmalloc.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 19 Aug 2010 19:01:11 +0000 (12:01 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 19 Aug 2010 23:30:55 +0000 (16:30 -0700)
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.

src/common/BackTrace.cc

index e8a7542d0399aaaa2d68a32abbc78284a12f9851..e6d1f74ac7ccdb0a47fe67b4af4f755eaedb052f 100644 (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