Skip to content

Commit 10f29a6

Browse files
authored
[MSan] Fix wrong unpoison size in SignalAction (#144071)
MSan should unpoison the parameters of extended signal handlers. However, MSan unpoisoned the second parameter with the wrong size `sizeof(__sanitizer_sigaction)`, inconsistent with its real type `siginfo_t`. This commit fixes this issue by correcting the size to `sizeof(__sanitizer_siginfo)`.
1 parent 7468718 commit 10f29a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/msan/msan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ static void SignalAction(int signo, void *si, void *uc) {
11271127
SignalHandlerScope signal_handler_scope;
11281128
ScopedThreadLocalStateBackup stlsb;
11291129
UnpoisonParam(3);
1130-
__msan_unpoison(si, sizeof(__sanitizer_sigaction));
1130+
__msan_unpoison(si, sizeof(__sanitizer_siginfo));
11311131
__msan_unpoison(uc, ucontext_t_sz(uc));
11321132

11331133
typedef void (*sigaction_cb)(int, void *, void *);

0 commit comments

Comments
 (0)