-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
MIPS host bootstrap: compiler_rt stack overflows #37823
Comments
This FreeBSD change seems more complete than the one found in the LLVM bug thread. |
It looks like the binaries we're distributing don't have this recursion, so I guess this is only happening when you're bootstrapping locally? If so, what compiler are you using? It'd be useful to drill into the command that actually compiled |
I'm indeed bootstrapping natively on MIPS64el.
Rust revision used is c87bae6 with #37800 applied. I'll try to look into the actual compiler invocation, as even though I applied the workaround the resulting |
The compiler invocation is like this (newlines added by me): cc -O2 -ffunction-sections -fdata-sections -ffunction-sections -fdata-sections -fPIC -fPIC \
-fno-builtin -fvisibility=hidden -fomit-frame-pointer -ffreestanding \
-o /opt/store/src/rust/build/mips64el-unknown-linux-gnuabi64/stage0-std/mips64el-unknown-linux-gnuabi64/release/build/compiler_builtins-5574dec8ddf5551f/out/../compiler-rt/lib/builtins/ctzdi2.o \
-c ../compiler-rt/lib/builtins/ctzdi2.c Ignore my previous comment that the workaround was ignored, I forgot to commit the submodule update and rustbuild reverted it to a previously broken one. The generated code now looks like this:
But the function called is now |
Hm ok, so is the same bug still happening? Or we're waiting to see if it's a new bug? Also, what was the workaround you applied? (e.g. the patch) |
The commit is xen0n/compiler-rt@556504d. I just saw a different crash but it's probably unrelated and spurious, I'm restarting the build to see if that's the case.
|
As for the |
Quick update: the double free was indeed spurious, the build is happily running now. Unfortunately I can't test the stage1 immediately, it's 3 am here. I'll see if the build can progress to anything more than stage1 later in the day. |
If you want to send that patch to our compiler-rt fork, I'd be happy to merge! |
Problem solved,
which are all expected to fail on MIPS but not ignored. I'll prepare a PR to |
I've opened rust-lang/compiler-rt#27. I'll open another PR to update the submodule after that PR is merged. |
Update compiler-rt to fix MIPS64 infinite recursion Fixes #37823. Test fixes are coming in a separate PR later. r? @alexcrichton
The cross-compiled MIPS host compilers are fine, but stage1 immediately segfaults when asked to do just about anything:
Notice the recursion, which is obviously wrong, and non-existent on stage0:
This is LLVM bug 11663. Maybe we should incorporate the workaround there as well.
The text was updated successfully, but these errors were encountered: