[compiler-rt] [lsan] Fix free(NULL) interception during initialization (PR #106912)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 12:57:00 PDT 2024
================
@@ -77,6 +77,8 @@ INTERCEPTOR(void*, malloc, uptr size) {
}
INTERCEPTOR(void, free, void *p) {
+ if (!p)
----------------
vitalybuka wrote:
this will fix only lsan
to fix all, I propose to change
`DlsymAlloc::PointerIsMine` to return true for NULL
and teach `DlsymAlloc::Free` to handle it correctly
https://github.com/llvm/llvm-project/pull/106912
More information about the llvm-commits
mailing list