Bug #4556
closedAll osmo-iuh fail with asan enabled and gcc 10.1.0
100%
Description
+================================================================= +==99092==ERROR: AddressSanitizer: odr-violation (0x560b019fdfe0): + [1] size=4 'asn1_xer_print' /osmo-iuh/src/tests/test-helpers.c:35:5 + [2] size=4 'asn1_xer_print' /osmo-iuh/src/iu_client.c:85:5 +These globals were registered at these points: + [1]: + #0 0x7faf77adf69a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x560b019f7c6e in _sub_I_00099_1 (/osmo-iuh/src/tests/test-helpers+0x5c6e) + #2 0x560b019f7fcc in __libc_csu_init (/osmo-iuh/src/tests/test-helpers+0x5fcc) + + [2]: + #0 0x7faf77adf69a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x7faf7742db91 in _sub_I_00099_1 (/osmo-iuh/src/.libs/libosmo-ranap.so.3+0x47db91) + #2 0x7faf784920f1 in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0x110f1) + +==99092==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 +SUMMARY: AddressSanitizer: odr-violation: global 'asn1_xer_print' at /osmo-iuh/src/tests/test-helpers.c:35:5 +==99092==ABORTING
Since I got newer gcc (9 -> 10), tests fail when building with ASan.
Updated by pespin almost 4 years ago
- Status changed from New to In Progress
Fixed by:
remote: https://gerrit.osmocom.org/c/osmo-iuh/+/18341 tests: Fix trailing whitespace
remote: https://gerrit.osmocom.org/c/osmo-iuh/+/18342 Fix OneDefinitionRule Asan violation in tests and osmo-hnbgw
there's also issues on some apps using it:
https://gerrit.osmocom.org/c/osmo-msc/+/18343 ran_msg_iu.c: Avoid redefining osmo-iuh global variables
Updated by pespin almost 4 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 90
This bunch also fixed compilation with new gcc and asan for osmo-pcu:
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/18348 sysmo: femtobts.h: Avoid redefining global variables
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/18349 rlc: Drop unused function gprs_rlc_data::put_data
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/18350 rlc: Move prepare() function out of gprs_rlc_data struct
remote: https://gerrit.osmocom.org/c/osmo-pcu/+/18351 Get rid of class GprsCodingScheme
Once merged, ticket can be closed.
Updated by pespin almost 4 years ago
- Status changed from Feedback to Resolved
- % Done changed from 90 to 100