File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
compiler-rt/test/ubsan_minimal/TestCases Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
2+
3+ void f (int & n) {}
4+
5+ int * t;
6+
7+ int main () {
8+ int r;
9+ t = (int *)(((char *)&r) + 1 );
10+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
11+ // CHECK-NOT: type-mismatch
12+
13+ f (*t);
14+ }
Original file line number Diff line number Diff line change 1+ // RUN: %clang_min_runtime -fsanitize=null %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
2+
3+ void f (int & n) {}
4+
5+ int * t;
6+
7+ int main () {
8+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
9+ // CHECK-NOT: type-mismatch
10+ f (*t);
11+ }
Original file line number Diff line number Diff line change 88
99static int Result ;
1010
11- void __ubsan_report_error (const char * kind , uintptr_t caller ) {
11+ void __ubsan_minimal_report_error (const char * kind , uintptr_t caller ) {
1212 fprintf (stderr , "CUSTOM_CALLBACK: %s\n" , kind );
1313}
1414
1515#if OVERRIDE
16- void __ubsan_report_error_fatal (const char * kind , uintptr_t caller ) {
16+ void __ubsan_minimal_report_error_fatal (const char * kind , uintptr_t caller ) {
1717 fprintf (stderr , "FATAL_CALLBACK: %s\n" , kind );
1818}
1919#endif
You can’t perform that action at this time.
0 commit comments