Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
proton-c-0.34.0
-
None
-
None
-
macOSX 10.15, AppleClang 12
Description
For example:
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
or more complex:
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
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.
Attachments
Issue Links
- is related to
-
PROTON-2354 C++ test failures on MacOS due to unexported symbols being hidden
- Closed