Open refi64 opened 3 months ago
I think what you're overall trying to say is that clang is garbage and we should emit a fatal configure time error if you try to enable sanitizers with it? :D
/cc @thesamesam who might know something about the clang internals here. I have often wondered the same problem and certainly don't have understanding of the answer.
I'm on diff. HW than usual which makes life a bit harder but I'll at least take a look at what's happening, even if I don't end up fixing it.
Describe the bug When running
g-ir-scanner
on a library built withb_sanitize=address
, link errors occur, because Clang's implementation also seems to requirelibclang_rt.asan
:To Reproduce
(
xyz.c
is entirely empty.)This results in:
The issue can be demo'd with just the clang CLI directly:
But the invocation you'd expect to work also does not:
The only way I actually got it to work was this incantation based on the output of
clang -fsanitize=address -v ...
:which removes
-lasan
completely (otherwise I getYour application is linked against incompatible ASan runtimes
on startup) and adds on-lm
(fixes some undefined references tosigngam
). I don't even know if these libraries are correct, though, because there are quite a few options:Expected behavior This should successfully run
g-ir-scanner
.system parameters
meson --version
testing on latest master and 1.2.3ninja --version
if it's a Ninja build 1.11.1