File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
lldb/test/Shell/Recognizer Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < limits.h>
2
+
3
+ int main () {
4
+ volatile int a = INT_MAX;
5
+ volatile int b = 1 ;
6
+ volatile int c = a + b;
7
+ return c;
8
+ }
Original file line number Diff line number Diff line change
1
+ # REQUIRES: clang
2
+
3
+ # RUN: %clang_host -g -O0 %S/Inputs/ubsan_add_overflow.cpp -o %t.out \
4
+ # RUN: -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow
5
+
6
+ # RUN: %lldb -b -s %s %t.out | FileCheck %s
7
+
8
+ run
9
+ # CHECK: thread #{{.*}} stop reason = Undefined Behavior Sanitizer: Integer addition overflowed
10
+
11
+ frame info
12
+ # CHECK: frame #{{.*}}`main at ubsan_add_overflow.cpp
13
+
14
+ frame recognizer info 0
15
+ # CHECK: frame 0 is recognized by Verbose Trap StackFrame Recognizer
16
+
17
+ quit
You can’t perform that action at this time.
0 commit comments