https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89856

--- Comment #3 from Daniel Vollmer <zerolo at gmail dot com> ---
These linker warnings then also seem to result in actual address-sanitizer
errors (which may or may not be spurious):

(Output not from the provided example, but the shown
_GLOBAL__sub_I_00099_1_CommunicationBuffersBase.cpp refers to a templated
method with a static local variable like the BroadcastFromMaster example.

Process 40885 launched:
'/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
(x86_64)
==40885==The following global variable is not properly aligned.
==40885==This may happen if another global with the same name
==40885==resides in another non-instrumented module.
==40885==Or the global comes from a C file built w/o -fno-common.
==40885==In either case this is likely an ODR violation bug,
==40885==but AddressSanitizer can not provide more details.
=================================================================
==40885==ERROR: AddressSanitizer: odr-violation (0x000500000083):
Process 40885 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x900000186)
    frame #0: 0x00000001000e7169
libasan.4.dylib`__asan::PrintGlobalLocation(__sanitizer::InternalScopedString*,
__asan_global const&) + 25
libasan.4.dylib`__asan::PrintGlobalLocation:
->  0x1000e7169 <+25>: movq   (%rax), %rdx
    0x1000e716c <+28>: testq  %rdx, %rdx
    0x1000e716f <+31>: je     0x1000e71e0               ; <+144>
    0x1000e7171 <+33>: leaq   0x79838(%rip), %rsi       ; "%s"
Target 0: (Python) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x900000186)
  * frame #0: 0x00000001000e7169
libasan.4.dylib`__asan::PrintGlobalLocation(__sanitizer::InternalScopedString*,
__asan_global const&) + 25
    frame #1: 0x00000001000df8bf
libasan.4.dylib`__asan::ErrorODRViolation::Print() + 191
    frame #2: 0x000000010013ba9c
libasan.4.dylib`__asan::ReportODRViolation(__asan_global const*, unsigned int,
__asan_global const*, unsigned int) + 1484
    frame #3: 0x00000001000e65ed
libasan.4.dylib`__asan_register_globals.part.11 + 1469
    frame #4: 0x000000010ae9df96
libFlis.dylib`_GLOBAL__sub_I_00099_1_CommunicationBuffersBase.cpp + 31
    frame #5: 0x000000010001c592
dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) +
506
    frame #6: 0x000000010001c798
dyld`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
    frame #7: 0x0000000100017bea
dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, char const*, ImageLoader::InitializerTimingList&,
ImageLoader::UninitedUpwards&) + 362
    frame #8: 0x0000000100017b80
dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, char const*, ImageLoader::InitializerTimingList&,
ImageLoader::UninitedUpwards&) + 256
    frame #9: 0x0000000100017b80
dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, char const*, ImageLoader::InitializerTimingList&,
ImageLoader::UninitedUpwards&) + 256
    frame #10: 0x0000000100016d73
dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned
int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 133
    frame #11: 0x0000000100016e05
dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&,
ImageLoader::InitializerTimingList&) + 73
    frame #12: 0x0000000100009cb2 dyld`dyld::runInitializers(ImageLoader*) + 82
    frame #13: 0x00000001000133dc dyld`dlopen_internal + 607
    frame #14: 0x00007fff713dbd43 libdyld.dylib`dlopen + 200
    frame #15: 0x00000001000f4f9b libasan.4.dylib`wrap_dlopen.part.109 + 75
    frame #16: 0x0000000100f1fef7 Python`_PyImport_GetDynLoadFunc + 306
    frame #17: 0x0000000100f0b43a Python`_PyImport_LoadDynamicModule + 89
    frame #18: 0x0000000100f0a209 Python`import_submodule + 273

Reply via email to