-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
run-make-fulldeps/foreign-exceptions loops on armv7-unknown-linux-gnueabihf #67242
Comments
cc @rust-lang/wg-ffi-unwind |
PS: while I initially saw this on Fedora rawhide, my followup testing has been on stable Fedora 31. |
That is very strange. And this behavior only occurs on ARM? I'm tempted to say that this is a bug in GCC's unwinder (in libgcc). Can you try this C++-only code to see if it has the same issue? a.cpp void foo() { throw 1234; } b.cpp void foo();
int main() {
try {
foo();
} catch (...) {
printf("caught exception in catch (...)\n");
throw;
}
} This should print the message once and then fail with an uncaught exception. |
Yes, the other arches completed and passed that test.
Needs
|
I tried stable 1.39 again commenting out the call to So at least it's not a new problem. Maybe we're generating bad unwind data, or maybe my libgcc has a bug in handling foreign exceptions, I don't know... |
I think this might be a bug in the way the personality routine in libstdc++ (libsupc++ actually) handles foreign exceptions on ARM. Can you try using libc++ instead of libstdc++? Just change the linker args for rustc from |
Oh, I found that Fedora does have libc++ packaged, |
It's fine to link to Can you post the test output with libc++? |
Maybe this is obvious, but I have to compile the C++ part with clang++, not g++, or it gets "undefined reference to
So I commented out
|
@cuviper you may need to explicitly link libcxxabi depending on how libcxx was built. That should fix undefined reference error. |
@mati865 I did use If anyone else is interested in arm-linux, it would be great to get more hands on this, because that target is not a high priority for me. I will probably disable this test for arm in Fedora in the meantime. |
I managed to reproduce this on Arch Linux with |
@cuviper no, that should be fine. Guess passing |
The link error was only when using g++ to compile foo.cpp. That much was ok with clang++. I just tried adding |
I'm hitting this on Debian too. Running |
Ah nvmd, I just had to wrap the thing in single-quotes to reproduce the loop, the output of "pstree" is misleading. |
Since this test is new in 1.40 I'll just |
Should be fixed by #67779 |
When I tested 1.40.0-beta.5 on Fedora rawhide,
run-make-fulldeps/foreign-exceptions
never completed onarmv7-unknown-linux-gnueabihf
. When I run that test on arm directly, I get:The same happens when I use official builds of Rust 1.40-beta and 1.41-nightly, so it's not just a problem with Fedora's build of rustc or LLVM. This test didn't exist before #65646, but running 1.39 on the current test just fails even earlier, as expected, "entered unreachable code: catch_unwind should not have caught foreign exception."
I tried compiling the C++ part with GCC 9.2.1 and Clang 9.0.0, both with the same result. That's using libstdc++ either way though, because we don't have LLVM's libc++ available.
cc @Amanieu
The text was updated successfully, but these errors were encountered: