summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp b/test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp
index f7af8aa85..3d6292439 100644
--- a/test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp
+++ b/test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp
@@ -1,5 +1,8 @@
// RUN: %clangxx -O1 %s -o %t && %env_tool_opts=handle_sigtrap=1 %run %t 2>&1 | FileCheck %s
+// __builtin_debugtrap() does not raise SIGTRAP these platforms.
+// UNSUPPORTED: s390
+
#include <assert.h>
#include <signal.h>
#include <stdio.h>
@@ -26,6 +29,8 @@ int main() {
assert(a.sa_flags & SA_SIGINFO);
in_handler = 1;
+ // Check that signal handler is not postponed by sanitizer.
+ // Don't use raise here as it calls any signal handler immediately.
__builtin_debugtrap();
in_handler = 0;