]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/BackTrace: print path without symbol 37487/head
authorKefu Chai <kchai@redhat.com>
Wed, 30 Sep 2020 05:51:03 +0000 (13:51 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 30 Sep 2020 05:52:20 +0000 (13:52 +0800)
before ea6abcf34c11c80dec507f7dee8babd26440196c, we have

2: (()+0x14140) [0x7f4462af6140]

after ea6abcf34c11c80dec507f7dee8babd26440196c, we have

2: ()

after this change, we have

2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7f7137e2f140]

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/BackTrace.cc

index e6396afe3a7391e5da5539b4109dfcdcca0a75df..42a8da2aebd1eb2e2a7cd43ce5f830e1e9730b4d 100644 (file)
@@ -46,7 +46,7 @@ std::string BackTrace::demangle(const char* name)
       end = j;
     }
   }
-  if (begin && end) {
+  if (begin && end && begin < end) {
     std::string mangled(begin, end);
     int status;
     // only demangle a C++ mangled name