forked from OSchip/llvm-project
[GWP-ASan] Fix uninitialized memory use in sigaction.
Fix up a small bug where we used a partially-uninitialized sigaction struct in the optional signal handler. Shouldn't be a user-visible change.
This commit is contained in:
parent
0f1494be43
commit
005eee8b3e
|
@ -144,7 +144,7 @@ void installSignalHandlers(gwp_asan::GuardedPoolAllocator *GPA, Printf_t Printf,
|
|||
PrintBacktraceForSignalHandler = PrintBacktrace;
|
||||
BacktraceForSignalHandler = SegvBacktrace;
|
||||
|
||||
struct sigaction Action;
|
||||
struct sigaction Action = {};
|
||||
Action.sa_sigaction = sigSegvHandler;
|
||||
Action.sa_flags = SA_SIGINFO;
|
||||
sigaction(SIGSEGV, &Action, &PreviousHandler);
|
||||
|
|
Loading…
Reference in New Issue