24 lines · cpp
1/// Fast unwinder does not work with Thumb code2// UNSUPPORTED: target=thumb{{.*}}3// UNSUPPORTED: android4 5// RUN: %clangxx -Wno-error=return-type -fsanitize=return %gmlt -O2 -fno-omit-frame-pointer -fasynchronous-unwind-tables %s -o %t6// RUN: %env_ubsan_opts=print_stacktrace=1:fast_unwind_on_fatal=0 not %run %t 2>&1 | FileCheck %s7// RUN: %env_ubsan_opts=print_stacktrace=1:fast_unwind_on_fatal=1 not %run %t 2>&1 | FileCheck %s8// RUN: %clangxx -Wno-error=return-type -fsanitize=return %gmlt -O2 -fno-omit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %s -o %t9// RUN: %env_ubsan_opts=print_stacktrace=1:fast_unwind_on_fatal=0 not %run %t 2>&1 | FileCheck %s10// RUN: %env_ubsan_opts=print_stacktrace=1:fast_unwind_on_fatal=1 not %run %t 2>&1 | FileCheck %s11 12// CHECK: runtime error: execution reached the end of a value-returning function without returning a value13// CHECK-NEXT: #0 {{.*}}f() {{.*}}.cpp:[[#@LINE+1]]14__attribute__((noinline)) int f() {}15 16// CHECK-NEXT: #1 {{.*}}g() {{.*}}.cpp:[[#@LINE+1]]17__attribute__((noinline)) void g() { f(); }18 19// CHECK-NEXT: #2 {{.*}}h() {{.*}}.cpp:[[#@LINE+1]]20__attribute__((noinline)) void h() { g(); }21 22// CHECK-NEXT: #3 {{.*}}main {{.*}}.cpp:[[#@LINE+1]]23int main() { h(); }24