-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
thread 'rustc' has overflowed its stack on sparc64-unknown-linux-gnu #45487
Comments
Here's what gdb says:
|
fn main() {
extern "C" {
// C signature: int __ctzdi2(long x)
fn __ctzdi2(x: i64) -> i32;
}
// you may need to test different inputs to trigger the bug (if there's one)
println!("{}", unsafe { __ctzdi2(0) });
} (N.B. CTZ stands for Count Trailing Zeros) |
@japaric It crashes the same way as
and the backtrace seems to indicate an infinite recursion as well:
|
Oh, very interesting, I just found this https://github.com/rust-lang/compiler-rt/pull/27/files:
This is veeeeery suspicious because there is definitely a workaround for this particular issue on sparc64. However, on sparc64-linux-gnu, the compiler does not define |
Yes, this fixes this particular issue:
|
Yes, exactly, see https://github.com/rust-lang/compiler-rt/pull/31/files |
@binarycrusader Yep. My suggestion would be to use |
After fixing this issue, we ran into this: #45509 |
As rust-lang/compiler-rt#33 got just merged, I'm closing this. |
With the two changes from #45456, I am able to cross-build
rustc
andcargo
.While
cargo
works fine on sparc64-unknown-linux-gnu,rustc
crashes with a stack-overflow:CC'ing @binarycrusader @jakllsch @japaric @jrtc27 who might be able to give some hints.
The text was updated successfully, but these errors were encountered: