]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/BackTrace: do not use len for length of demangled symbol 37261/head
authorKefu Chai <kchai@redhat.com>
Sun, 20 Sep 2020 03:30:26 +0000 (11:30 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 20 Sep 2020 03:34:53 +0000 (11:34 +0800)
commit14b6d35b17b3316eb8d30f009ad18dc793e0929b
tree8a1efa3fe078900a72386a77078c8e5775a4db3c
parent7eceaf45de798ffa79ed328706a0b0c86ae4e06e
common/BackTrace: do not use len for length of demangled symbol

it turns out `len` is longer than the length of demangled symbol,
let's rely on the `\0` sentry in the returned char* string instead.

in this change, use `status` to tell if the demangle is successful or
not.

Fixes: https://tracker.ceph.com/issues/47552
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/BackTrace.cc