27113, "dlongnecke-cray", "[Bug]: arcane link errors when 'CHPL_SANITIZE_EXE=address' and 'CHPL_LLVM != none'", "2025-04-15T22:29:12Z"
Today if I compile with ASAN to debug my Chapel binary, printchplenv
will warn me that only certain configuration options (e.g., CHPL_TASKS=fifo
) are supported, but will not mention LLVM.
Later down the line when I'm compiling e.g., chpl Foo.chpl
with instrumentation, I'll get arcane link errors:
"___asan_unregister_image_globals", referenced from:
_asan.module_dtor in libchpl.a[2](arg.o)
_asan.module_dtor in libchpl.a[3](chpl-env.o)
_asan.module_dtor in libchpl.a[4](chpl-linefile-support.o)
_asan.module_dtor in libchpl.a[5](chpl-string-support.o)
_asan.module_dtor in libchpl.a[6](chplcast.o)
_asan.module_dtor in libchpl.a[7](config.o)
_asan.module_dtor in libchpl.a[8](error.o)
...
"___asan_version_mismatch_check_v8", referenced from:
_asan.module_ctor in main.o
_asan.module_ctor in libchpl.a[2](arg.o)
_asan.module_ctor in libchpl.a[3](chpl-env.o)
_asan.module_ctor in libchpl.a[4](chpl-linefile-support.o)
_asan.module_ctor in libchpl.a[5](chpl-string-support.o)
_asan.module_ctor in libchpl.a[6](chplcast.o)
_asan.module_ctor in libchpl.a[7](config.o)
It turns out this is because ASAN is not supported with LLVM: Sanitizers — Chapel Documentation 2.4
In the long run we'd like to support using ASAN with LLVM, but in the meantime maybe we could have printchplenv
complain just like it does for other settings if you try to turn on CHPL_SANITIZE...=address
and have CHPL_LLVM
set to something besides none
.