]> git.lizzy.rs Git - rust.git/blob - tests/ui/panics/panic-short-backtrace-windows-x86_64.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / panics / panic-short-backtrace-windows-x86_64.rs
1 // This test has been spuriously failing a lot recently (#92000).
2 // Ignore it until the underlying issue is fixed.
3 // ignore-test
4
5 // Regression test for #87481: short backtrace formatting cut off the entire stack trace.
6
7 // Codegen-units is specified here so that we can replicate a typical rustc invocation which
8 // is not normally limited to 1 CGU. This is important so that the `__rust_begin_short_backtrace`
9 // and `__rust_end_short_backtrace` symbols are not marked internal to the CGU and thus will be
10 // named in the symbol table.
11 // compile-flags: -O -Ccodegen-units=8
12
13 // run-fail
14 // check-run-results
15 // exec-env:RUST_BACKTRACE=1
16
17 // We need to normalize out frame 5 because without debug info, dbghelp.dll doesn't know where CGU
18 // internal functions like `main` start or end and so it will return whatever symbol happens
19 // to be located near the address.
20 // normalize-stderr-test: "5: .*" -> "5: some Rust fn"
21
22 // Backtraces are pretty broken in general on i686-pc-windows-msvc (#62897).
23 // only-x86_64-pc-windows-msvc
24
25 fn main() {
26     a();
27 }
28
29 // Make these no_mangle so dbghelp.dll can figure out the symbol names.
30
31 #[no_mangle]
32 #[inline(never)]
33 fn a() {
34     b();
35 }
36
37 #[no_mangle]
38 #[inline(never)]
39 fn b() {
40     c();
41 }
42
43 #[no_mangle]
44 #[inline(never)]
45 fn c() {
46     d();
47 }
48
49 #[no_mangle]
50 #[inline(never)]
51 fn d() {
52     panic!("d was called");
53 }