[compiler-rt] [compiler-rt][rtsan] Use sanitizer internal allocator during rtsan init to avoid segfault in dlsym (PR #98679)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 14:03:40 PDT 2024
================
@@ -238,23 +243,35 @@ INTERCEPTOR(int, nanosleep, const struct timespec *rqtp,
// Memory
INTERCEPTOR(void *, calloc, SIZE_T num, SIZE_T size) {
+ if (rtsan_init_is_running && REAL(calloc) == nullptr)
----------------
MaskRay wrote:
We should define `UseImpl` and use `DlsymAlloc::Use`. See #98415
https://github.com/llvm/llvm-project/pull/98679
More information about the llvm-commits
mailing list