Skip to content

Commit 400389d

Browse files
authored
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
1 parent 306f4c3 commit 400389d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/asan/asan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ INTERCEPTOR(int, pthread_create, void *thread, void *attr,
251251

252252
u32 current_tid = GetCurrentTidOrInvalid();
253253

254-
__sanitizer_sigset_t sigset;
254+
__sanitizer_sigset_t sigset = {};
255255
# if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || \
256256
SANITIZER_SOLARIS
257257
ScopedBlockSignals block(&sigset);

0 commit comments

Comments
 (0)