Skip to content

Commit c185b8f

Browse files
committed
rewrite longjmp-across-rust to rmake
1 parent 9c9f8a1 commit c185b8f

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
@@ -72,7 +72,6 @@ run-make/link-path-order/Makefile
7272
run-make/linkage-attr-on-static/Makefile
7373
run-make/long-linker-command-lines-cmd-exe/Makefile
7474
run-make/long-linker-command-lines/Makefile
75-
run-make/longjmp-across-rust/Makefile
7675
run-make/lto-linkage-used-attr/Makefile
7776
run-make/lto-no-link-whole-rlib/Makefile
7877
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)