Skip to content

Commit 3c490c0

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent 8832a59 commit 3c490c0

File tree

1 file changed

+11
-0
lines changed
  • compiler-rt/test/ubsan_minimal/TestCases

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %clang -fsanitize=cfi-icall -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden %s -o %t && not %run %t 2>&1 | FileCheck %s
2+
3+
// RUN: %clang -fsanitize=cfi-icall -fno-sanitize-trap=cfi-icall -fsanitize-recover=cfi-icall -flto -fvisibility=hidden %s -o %t && %run %t 2>&1 | FileCheck %s
4+
5+
void f() {
6+
}
7+
8+
int main() {
9+
// CHECK: ubsan: cfi-check-fail by 0x
10+
((void (*)(int))f)(42);
11+
}

0 commit comments

Comments
 (0)