AddressSanitizer: odr-violation: global 'dns_lctx' at log.c:69:33
On Fedora 33 with gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) with ASAN, but not Debian 10 with gcc 8.3.0 we have in the CI, I get following error when running the dyndb
system test:
29-Jan-2021 11:25:04.597 loading DynDB instance 'sample' driver '../driver/lib/sample.so'
=================================================================
==2511090==ERROR: AddressSanitizer: odr-violation (0x7f9e15d78d00):
[1] size=8 'dns_lctx' log.c:69:33
[2] size=8 'dns_lctx' log.c:69:33
These globals were registered at these points:
[1]:
#0 0x7f9e324a7328 (/lib64/libasan.so.6+0x37328)
#1 0x7f9e14913fb2 in _sub_I_00099_1 (../driver/lib/sample.so+0xaa8fb2)
#2 0x7f9e32e6f8dd in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0x108dd)
[2]:
#0 0x7f9e324a7328 (/lib64/libasan.so.6+0x37328)
#1 0x737dad in _sub_I_00099_1 (/home/newman/isc/ws/bind9/bin/named/named+0x737dad)
#2 0xe634bc in __libc_csu_init (/home/newman/isc/ws/bind9/bin/named/named+0xe634bc)
==2511090==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'dns_lctx' at log.c:69:33
Thread T13 created by T0 here:
#0 0x7f9e324c5f46 in __interceptor_pthread_create (/lib64/libasan.so.6+0x55f46)
#1 0xe5ecfa in isc_thread_create /home/newman/isc/ws/bind9/lib/isc/pthreads/thread.c:73
#2 0xe08c5a in isc_taskmgr_create /home/newman/isc/ws/bind9/lib/isc/task.c:1434
#3 0x45a841 in create_managers main.c:924
#4 0x45a841 in setup main.c:1265
#5 0x45a841 in main main.c:1568
#6 0x7f9e312541e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)
==2511090==ABORTING
This problem does not manifest on main
.