Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux + ASAN + MI_TRACK_ASAN + MI_OVERRIDE + static linking #1023

Open
Noxybot opened this issue Feb 25, 2025 · 1 comment
Open

Linux + ASAN + MI_TRACK_ASAN + MI_OVERRIDE + static linking #1023

Noxybot opened this issue Feb 25, 2025 · 1 comment

Comments

@Noxybot
Copy link

Noxybot commented Feb 25, 2025

Hi! Is this use-case supported?
If I enable ASAN + MI_OVERRIDE, I seem to not be able to compile executable b.c. of such errors:

[1]  ld.lld: error: duplicate symbol: operator delete[](void*)
[1]  >>> defined at asan_new_delete.cpp.o:(operator delete[](void*)) in archive /usr/lib/llvm-12/lib/clang/12.0.1/lib/linux/libclang_rt.asan_cxx-x86_64.a
[1]  >>> defined at alloc-override.c:193 (mimalloc/src/alloc-override.c:193)
[1]  >>>            CMakeFiles/mimalloc-static.dir/src/alloc.c.o:(.text+0x750) in archive mimalloc/libmimalloc-asan-optimized.a
@Noxybot
Copy link
Author

Noxybot commented Feb 25, 2025

Seems like libclang_rt.asan_cxx-x86_64.a is linked by clang itself. I tried work-around it by linking to the mimalloc's object file (as opposed to the static lib), but also didn't work when combined with "-fsanitize=address".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant