Skip to content

Commit 2733494

Browse files
committed
rewrite c-unwind-abi-catch-panic to rmake
1 parent 7b19389 commit 2733494

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ run-make/c-dynamic-rlib/Makefile
44
run-make/c-static-dylib/Makefile
55
run-make/c-static-rlib/Makefile
66
run-make/c-unwind-abi-catch-lib-panic/Makefile
7-
run-make/c-unwind-abi-catch-panic/Makefile
87
run-make/cat-and-grep-sanity-check/Makefile
98
run-make/cdylib-dylib-linkage/Makefile
109
run-make/compiler-lookup-paths-2/Makefile

tests/run-make/c-unwind-abi-catch-panic/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// A test for calling `C-unwind` functions across foreign function boundaries (FFI).
2+
// This test triggers a panic when calling a foreign function that calls *back* into Rust.
3+
// This catches a panic across an FFI boundary and downcasts it into an integer.
4+
// The Rust code that panics is in the same directory, unlike `c-unwind-abi-catch-lib-panic`.
5+
// See https://github.com/rust-lang/rust/pull/76570
6+
7+
//@ ignore-cross-compile
8+
// Reason: the compiled binary is executed
9+
//@ needs-unwind
10+
// Reason: this test exercises panic unwinding
11+
12+
use run_make_support::{build_native_static_lib, run, rustc};
13+
14+
fn main() {
15+
build_native_static_lib("add");
16+
rustc().input("main.rs").run();
17+
run("main");
18+
}

0 commit comments

Comments
 (0)