[NFC][AArch64] Explicitly define undefined bits for instructions (#122129)
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Linux / symbolize_stack_fp.cpp
blobc581055e0b1b019c20c98a713e27c41ed9c9bb6b
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
14 // SEC: .debug_frame
16 #include <sanitizer/common_interface_defs.h>
17 #include <vector>
19 template <int N>
20 struct A {
21 template <class T>
22 void RecursiveTemplateFunction(const T &t);
25 template <int N>
26 template <class T>
27 __attribute__((noinline)) void A<N>::RecursiveTemplateFunction(const T &) {
28 std::vector<T> t;
29 return A<N - 1>().RecursiveTemplateFunction(t);
32 template <>
33 template <class T>
34 __attribute__((noinline)) void A<0>::RecursiveTemplateFunction(const T &) {
35 __sanitizer_print_stack_trace();
38 int main() {
39 // CHECK: {{vector<.*vector<.*vector<.*vector<.*vector<}}
40 A<7>().RecursiveTemplateFunction(0);