[compiler-rt] 400389d - Initialize sigset in asan_interceptors (#69502)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 13:01:39 PDT 2023
Author: Ivan Tadeu Ferreira Antunes Filho
Date: 2023-10-18T13:01:36-07:00
New Revision: 400389db7de3aac4cd56c95789014aa9206e376b
URL: https://github.com/llvm/llvm-project/commit/400389db7de3aac4cd56c95789014aa9206e376b
DIFF: https://github.com/llvm/llvm-project/commit/400389db7de3aac4cd56c95789014aa9206e376b.diff
LOG: Initialize sigset in asan_interceptors (#69502)
When compiling for Darwin, sigset is not initialized.
When -Werror,-Wuninitialized-const-reference are enabled we see the
error:
asan_interceptors.cpp:260:38: error: variable 'sigset' is uninitialized
when passed as a const reference argument here
[-Werror,-Wuninitialized-const-reference]
This fixes the error
Added:
Modified:
compiler-rt/lib/asan/asan_interceptors.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_interceptors.cpp b/compiler-rt/lib/asan/asan_interceptors.cpp
index fc7c5b7b8fbfade..876682c3b6b3a35 100644
--- a/compiler-rt/lib/asan/asan_interceptors.cpp
+++ b/compiler-rt/lib/asan/asan_interceptors.cpp
@@ -251,7 +251,7 @@ INTERCEPTOR(int, pthread_create, void *thread, void *attr,
u32 current_tid = GetCurrentTidOrInvalid();
- __sanitizer_sigset_t sigset;
+ __sanitizer_sigset_t sigset = {};
# if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || \
SANITIZER_SOLARIS
ScopedBlockSignals block(&sigset);
More information about the llvm-commits
mailing list