1 // RUN: %clangxx_msan -O0 -g %s -o %t
2 // RUN: MSAN_OPTIONS=handle_segv=2 %t 2>&1 | FileCheck %s
9 extern "C" int __interceptor_sigaction(int signum
, const struct sigaction
*act
, struct sigaction
*oldact
);
10 extern "C" int sigaction(int signum
, const struct sigaction
*act
, struct sigaction
*oldact
) {
11 write(2, "sigaction call\n", sizeof("sigaction call\n") - 1);
12 return __interceptor_sigaction(signum
, act
, oldact
);
16 struct sigaction oldact
;
17 sigaction(SIGSEGV
, nullptr, &oldact
);
19 if (oldact
.sa_handler
|| oldact
.sa_sigaction
) {
20 fprintf(stderr
, "oldact filled\n");
23 // CHECK: sigaction call
24 // CHECK: oldact filled