Skip to content

Commit 98454ec

Browse files
committed
rewrite longjmp-across-rust to rmake
1 parent d6a3f65 commit 98454ec

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
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
@@ -65,7 +65,6 @@ run-make/link-path-order/Makefile
6565
run-make/linkage-attr-on-static/Makefile
6666
run-make/long-linker-command-lines-cmd-exe/Makefile
6767
run-make/long-linker-command-lines/Makefile
68-
run-make/longjmp-across-rust/Makefile
6968
run-make/lto-linkage-used-attr/Makefile
7069
run-make/lto-no-link-whole-rlib/Makefile
7170
run-make/lto-smoke-c/Makefile

tests/run-make/longjmp-across-rust/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// longjmp, an error handling function used in C, is useful
2+
// for jumping out of nested call chains... but it used to accidentally
3+
// trigger Rust's cleanup system in a way that caused an unexpected abortion
4+
// of the program. After this was fixed in #48572, this test compiles and executes
5+
// a program that jumps between Rust and its C library, with longjmp included. For
6+
// the test to succeed, no unexpected abortion should occur.
7+
// See https://github.com/rust-lang/rust/pull/48572
8+
9+
//@ ignore-cross-compile
10+
// Reason: the compiled binary is executed
11+
12+
use run_make_support::{build_native_static_lib, run, rustc};
13+
14+
fn main() {
15+
build_native_static_lib("foo");
16+
rustc().input("main.rs").run();
17+
run("main");
18+
}

0 commit comments

Comments
 (0)