forked from OSchip/llvm-project
[sanitizer] Print SIGTRAP for corresponding signal
Reviewers: eugenis, jfb Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68603 llvm-svn: 373979
This commit is contained in:
parent
87dd968849
commit
9917c76107
|
@ -312,6 +312,8 @@ const char *SignalContext::Describe() const {
|
|||
return "SEGV";
|
||||
case SIGBUS:
|
||||
return "BUS";
|
||||
case SIGTRAP:
|
||||
return "TRAP";
|
||||
}
|
||||
return "UNKNOWN SIGNAL";
|
||||
}
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue