From 3694631c1ac029199a7b6afd7cf1a963c7947de9 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 18 May 2020 10:43:57 +0200 Subject: ran_msg_iu.c: Avoid redefining osmo-iuh global variables From ASAn on gcc 10.1.0: +================================================================= +==269368==ERROR: AddressSanitizer: odr-violation (0x559114a5b880): + [1] size=4 'asn1_xer_print' /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 + [2] size=4 'asn1_xer_print' /git/osmo-iuh/src/iu_client.c:85:5 +These globals were registered at these points: + [1]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x55911456d221 in _sub_I_00099_1 (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x48d221) + #2 0x5591145e8e9c in __libc_csu_init (/build/new/tmpdir/osmo-msc/tests/msc_vlr/msc_vlr_test_hlr_timeout+0x508e9c) + + [2]: + #0 0x7f6208d3869a in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341 + #1 0x7f6207d8db91 in _sub_I_00099_1 (/build/new/out/lib/libosmo-ranap.so.3+0x47db91) + #2 0x7f62096eb0f1 in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0x110f1) + +==269368==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 /git/osmo-msc/src/libmsc/ran_msg_iu.c:50:5 +==269368==ABORTING Related: OS#4556 Change-Id: I702e9748eaaf2279c3764ba67f80f00ae9f2526f --- src/libmsc/ran_msg_iu.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c index e056de46a..b17aef852 100644 --- a/src/libmsc/ran_msg_iu.c +++ b/src/libmsc/ran_msg_iu.c @@ -39,16 +39,6 @@ #include #include -/* Implement the extern talloc_asn1_ctx from libasn1c as talloc ctx for ASN.1 message composition */ -void *talloc_asn1_ctx = NULL; - -/* Implement the extern asn_debug from libasn1c to indicate whether to print asn.1 debug messages. */ -int asn_debug = 0; - -/* Implement the extern asn1_xer_print to indicate whether the ASN.1 binary code decoded and encoded during Iu - * communication should be logged to stderr (see asn.1 generated code in osmo-iuh). */ -int asn1_xer_print = 0; - #define LOG_RAN_IU_DEC(RAN_DEC, level, fmt, args...) \ LOG_RAN_DEC(RAN_DEC, DIUCS, level, "RANAP: " fmt, ## args) -- cgit v1.2.3