[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:
Mitch Phillips 2020-07-27 05:46:43 -07:00
parent 0f1494be43
commit 005eee8b3e
1 changed files with 1 additions and 1 deletions

View File

@ -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);