We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37f7d32 commit ecd04fdCopy full SHA for ecd04fd
tests/run-make/forced-unwind-terminate-pof/Makefile
@@ -0,0 +1,9 @@
1
+# ignore-cross-compile
2
+# only-linux
3
+include ../tools.mk
4
+
5
+all: foo
6
+ $(call RUN,foo) | $(CGREP) -v "cannot unwind"
7
8
+foo: foo.rs
9
+ $(RUSTC) $<
tests/run-make/forced-unwind-terminate-pof/foo.rs
@@ -0,0 +1,17 @@
+// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
+#![feature(c_unwind)]
+#![no_main]
+extern "C-unwind" {
+ fn pthread_exit(v: *mut core::ffi::c_void) -> !;
+}
10
+unsafe extern "C" fn call_pthread_exit() {
11
+ pthread_exit(core::ptr::null_mut());
12
13
14
+#[no_mangle]
15
+unsafe extern "C-unwind" fn main(_argc: core::ffi::c_int, _argv: *mut *mut core::ffi::c_char) {
16
+ call_pthread_exit();
17
0 commit comments