1 /// When the main program doesn't use .eh_frame, the slow unwinder does not work.
2 /// Test that we can fall back to the fast unwinder.
3 // RUN: %clangxx -O0 -g1 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer %s -o %t
4 // RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC
5 // RUN: %run %t 2>&1 | FileCheck %s
7 // On android %t is a wrapper python script so llvm-readelf will fail.
8 // UNSUPPORTED: android
10 /// Fast unwinder does not work with Thumb code
11 // UNSUPPORTED: target={{.*thumb.*}}
13 /// No .eh_frame && -g => .debug_frame
16 #include <sanitizer/common_interface_defs.h>
22 void RecursiveTemplateFunction(const T
&t
);
27 __attribute__((noinline
)) void A
<N
>::RecursiveTemplateFunction(const T
&) {
29 return A
<N
- 1>().RecursiveTemplateFunction(t
);
34 __attribute__((noinline
)) void A
<0>::RecursiveTemplateFunction(const T
&) {
35 __sanitizer_print_stack_trace();
39 // CHECK: {{vector<.*vector<.*vector<.*vector<.*vector<}}
40 A
<7>().RecursiveTemplateFunction(0);