rewrite longjmp-across-rust to rmake
This commit is contained in:
parent
d6a3f65db0
commit
98454ece33
@ -65,7 +65,6 @@ run-make/link-path-order/Makefile
|
|||||||
run-make/linkage-attr-on-static/Makefile
|
run-make/linkage-attr-on-static/Makefile
|
||||||
run-make/long-linker-command-lines-cmd-exe/Makefile
|
run-make/long-linker-command-lines-cmd-exe/Makefile
|
||||||
run-make/long-linker-command-lines/Makefile
|
run-make/long-linker-command-lines/Makefile
|
||||||
run-make/longjmp-across-rust/Makefile
|
|
||||||
run-make/lto-linkage-used-attr/Makefile
|
run-make/lto-linkage-used-attr/Makefile
|
||||||
run-make/lto-no-link-whole-rlib/Makefile
|
run-make/lto-no-link-whole-rlib/Makefile
|
||||||
run-make/lto-smoke-c/Makefile
|
run-make/lto-smoke-c/Makefile
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# ignore-cross-compile
|
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
all: $(call NATIVE_STATICLIB,foo)
|
|
||||||
$(RUSTC) main.rs
|
|
||||||
$(call RUN,main)
|
|
18
tests/run-make/longjmp-across-rust/rmake.rs
Normal file
18
tests/run-make/longjmp-across-rust/rmake.rs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// longjmp, an error handling function used in C, is useful
|
||||||
|
// for jumping out of nested call chains... but it used to accidentally
|
||||||
|
// trigger Rust's cleanup system in a way that caused an unexpected abortion
|
||||||
|
// of the program. After this was fixed in #48572, this test compiles and executes
|
||||||
|
// a program that jumps between Rust and its C library, with longjmp included. For
|
||||||
|
// the test to succeed, no unexpected abortion should occur.
|
||||||
|
// See https://github.com/rust-lang/rust/pull/48572
|
||||||
|
|
||||||
|
//@ ignore-cross-compile
|
||||||
|
// Reason: the compiled binary is executed
|
||||||
|
|
||||||
|
use run_make_support::{build_native_static_lib, run, rustc};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
build_native_static_lib("foo");
|
||||||
|
rustc().input("main.rs").run();
|
||||||
|
run("main");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user