[sanitizer] Disable signal_trap_handler on s390
authorVitaly Buka <vitalybuka@google.com>
Wed, 9 Oct 2019 20:48:50 +0000 (20:48 +0000)
committerVitaly Buka <vitalybuka@google.com>
Wed, 9 Oct 2019 20:48:50 +0000 (20:48 +0000)
llvm-svn: 374220

compiler-rt/test/sanitizer_common/TestCases/Linux/signal_trap_handler.cpp

index f7af8aa..3d62924 100644 (file)
@@ -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;