[compiler-rt] [lsan] Fix free(NULL) interception during initialization (PR #106912)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 14:04:33 PDT 2024
================
@@ -77,6 +77,8 @@ INTERCEPTOR(void*, malloc, uptr size) {
}
INTERCEPTOR(void, free, void *p) {
+ if (!p)
----------------
tmiasko wrote:
Indeed there are a few more sanitizers that missed this special case.
I would suggest fixing those by considering NULL, since DlsymAlloc owning NULL would be counterproductive for realloc.
https://github.com/llvm/llvm-project/pull/106912
More information about the llvm-commits
mailing list