]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/buffer: do not deref _raw ptr when checking for hypercombind buf
authorKefu Chai <kchai@redhat.com>
Sat, 5 Sep 2020 13:10:48 +0000 (21:10 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 7 Sep 2020 15:22:43 +0000 (23:22 +0800)
commit1dcc57895ce422ba5a372898f1d7c17484366024
tree4395a9848b8226b9f3b1274a48dbb5bb4e73fb55
parent0f0addb4d75645359bb3ecb3b09183da3c2d495e
common/buffer: do not deref _raw ptr when checking for hypercombind buf

_raw could be null when the buffer::ptr is std::moved away. and ASan
complains when we try to dereference a nullptr. so use a little awkward
way to calculate the address instead

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/buffer.cc