Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cpp =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cpp +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cpp @@ -312,6 +312,8 @@ return "SEGV"; case SIGBUS: return "BUS"; + case SIGTRAP: + return "TRAP"; } return "UNKNOWN SIGNAL"; } Index: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_trap.cpp =================================================================== --- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_trap.cpp +++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/signal_trap.cpp @@ -0,0 +1,8 @@ +// RUN: %clangxx -O1 %s -o %t && %env_tool_opts=handle_sigtrap=2 not %run %t 2>&1 | FileCheck %s + +int main() { + __builtin_debugtrap(); +} + +// CHECK: Sanitizer:DEADLYSIGNAL +// CHECK: Sanitizer: TRAP on unknown address