Andrew Stitcher created PROTON-2371:
---------------------------------------
Summary: C++ test failures on MacOS with ASAN due to unexported
symbols being hidden
Key: PROTON-2371
URL: https://issues.apache.org/jira/browse/PROTON-2371
Project: Qpid Proton
Issue Type: Bug
Components: proton-c
Affects Versions: proton-c-0.34.0
Environment: macOSX 10.15, AppleClang 12
Reporter: Andrew Stitcher
For example:
{noformat}
13: ../cpp/src/session.cpp:71:21: runtime error: member call on address
0x7ffee55639e0 which does not point to an object of type
'proton::io::link_namer'
13: 0x7ffee55639e0: note: object is of type '(anonymous namespace)::namer'
13: ff ff 00 00 f0 3d 76 0a 01 00 00 00 78 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
13: ^~~~~~~~~~~~~~~~~~~~~~~
13: vptr for '(anonymous namespace)::namer'
13: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../cpp/src/session.cpp:71:21 in
{noformat}
or more complex:
{noformat}
19:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1808:30:
runtime error: member call on address 0x60400000d6d0 which does not point to
an object of type 'std::__1::__function::__base<void ()>'
19: 0x60400000d6d0: note: object is of type
'std::__1::__function::__func<std::__1::__bind<void ((anonymous
namespace)::hang_tester::*)(proton::container*), (anonymous
namespace)::hang_tester*, proton::container*>,
std::__1::allocator<std::__1::__bind<void ((anonymous
namespace)::hang_tester::*)(proton::container*), (anonymous
namespace)::hang_tester*, proton::container*> >, void ()>'
19: 1d 00 80 0b b0 f5 43 0e 01 00 00 00 e0 c2 40 0e 01 00 00 00 00 00 00 00
00 00 00 00 40 98 84 e1
19: ^~~~~~~~~~~~~~~~~~~~~~~
19: vptr for 'std::__1::__function::__func<std::__1::__bind<void
((anonymous namespace)::hang_tester::*)(proton::container*), (anonymous
namespace)::hang_tester*, proton::container*>,
std::__1::allocator<std::__1::__bind<void ((anonymous
namespace)::hang_tester::*)(proton::container*), (anonymous
namespace)::hang_tester*, proton::container*> >, void ()>'
19: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1808:30
in
{noformat}
These errors seem to be occuring for the same reason as PROTON-2354 -- the RTTI
information is no being correctly generated for some objects and when the UBSAN
code goes to check whether the correct object relationships occur it fails
because the RTTI information is not correct.
If the build uses {{-DENABLE_HIDE_UNEXPORTED_SYMBOLS=no}} then these errors go
away, so this is a fine workaround. But the solution is undoubtedly the same as
PROTON-2354 -- to create some more key functions (as in exported virtual
destructors) in some more classes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]