[win/asan] GetInstructionSize: Make `83 EC XX` a generic entry. (#119537)
[llvm-project.git] / cross-project-tests / debuginfo-tests / llgdb-tests / asan-deque.cpp
blobae765dbbc96aa56ab12c5f05fe77ceb81c98e931
1 // RUN: %clangxx -arch x86_64 %target_itanium_abi_host_triple -O1 -g %s -o %t.out -fsanitize=address
2 // RUN: %test_debuginfo %s %t.out
3 // REQUIRES: !asan, compiler-rt, system-darwin
4 // Zorg configures the ASAN stage2 bots to not build the asan
5 // compiler-rt. Only run this test on non-asanified configurations.
6 // gdb is used on non-darwin; some configs pretty print std::deque,
7 // some don't.
8 // UNSUPPORTED: apple-lldb-pre-1000
9 // XFAIL: !system-darwin && gdb-clang-incompatibility
10 #include <deque>
12 struct A {
13 int a;
14 A(int a) : a(a) {}
17 using log_t = std::deque<A>;
19 static void __attribute__((noinline, optnone)) escape(log_t &log) {
20 static volatile log_t *sink;
21 sink = &log;
24 int main() {
25 log_t log;
26 log.push_back(1234);
27 log.push_back(56789);
28 escape(log);
29 // DEBUGGER: break 28
30 while (!log.empty()) {
31 auto record = log.front();
32 log.pop_front();
33 escape(log);
34 // DEBUGGER: break 33
38 // DEBUGGER: r
40 // (at line 28)
41 // DEBUGGER: p log
42 // CHECK: 1234
43 // CHECK: 56789
45 // DEBUGGER: c
47 // (at line 33)
48 // DEBUGGER: p log
49 // CHECK: 56789