summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc b/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
index dd18213d61e..23e32a88492 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc
@@ -13,12 +13,11 @@
// "benign" SEGVs that are handled by signal handler, and ensures that
// the process survive.
-// REQUIRES: disabled
-
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/mman.h>
+#include <string.h>
void *guard;
@@ -28,6 +27,8 @@ void handler(int signo, siginfo_t *info, void *uctx) {
int main() {
struct sigaction a, old;
+ memset(&a, 0, sizeof(a));
+ memset(&old, 0, sizeof(old));
a.sa_sigaction = handler;
a.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &a, &old);
OpenPOWER on IntegriCloud