Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined references to rust_eh_unwind_resume on x86_64-pc-windows-gnu #177

Closed
alexcrichton opened this issue Jul 10, 2017 · 3 comments
Closed

Comments

@alexcrichton
Copy link
Member

Originally from rust-lang/rust#43095 the reason this doesn't "just work" is because of rust-lang/rust#43151 and rust-lang/rust#43150. We should find a workaround in this repository for avoiding those bugs and check this into the test suite:

diff --git a/ci/run.sh b/ci/run.sh
index 9a32ee9..1b2cd7f 100755
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -116,7 +116,7 @@ if [ -z "$DEBUG_LTO_BUILD_DOESNT_WORK" ]; then
   RUSTFLAGS="-C debug-assertions=no" \
     $cargo rustc --features "$INTRINSICS_FEATURES" --target $1 --example intrinsics -- -C lto
 fi
 $cargo rustc --features "$INTRINSICS_FEATURES" --target $1 --example intrinsics --release -- -C lto

 # Ensure no references to a panicking function
 for rlib in $(echo $path); do
@@ -126,6 +126,12 @@ for rlib in $(echo $path); do
     if test $? = 0; then
         exit 1
     fi
+
+    $PREFIX$NM -u $rlib 2>&1 | grep unwind_resume
+
+    if test $? = 0; then
+        exit 1
+    fi
     set -ex
 done

One possible workaround may be to make these methods (I think the Int::aborting_* methods) generic with a random type parameter to force codegen to not generate landign pads here. Another "fix" would to actually fix these bugs upstream!

@mati865
Copy link

mati865 commented Apr 10, 2020

Both mentioned issues are closed and there is rust-lang/rust#70846
This issue shouldn't be the case anymore.

@Amanieu
Copy link
Member

Amanieu commented Apr 20, 2020

The eh_unwind_resume lang item was removed in #67502. This issue can be closed.

@alexcrichton
Copy link
Member Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants