-
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
SIGSEGV in the compiler #82065
Comments
@rustbot label -I-ICE +I-crash Looks like there isn't even a feature label for llvm_asm. |
Yes, That said this looks like a potentially genuine LLVM bug, so reporting it upstream may make sense still. define internal void @banana() unnamed_addr {
start:
tail call void asm sideeffect "mov $0, %rax", "i,~{dirflag},~{fpsr},~{flags}"({} undef)
ret void
} is the LLVM-IR reproducer. |
I couldn't repro it in C, so i assumed it's a rust bug. I guess i was wrong. |
Its a unspecified bit pattern of type |
This is probably because it considers Which suggests this workaround: #![feature(llvm_asm)]
fn main() {
unsafe { llvm_asm!("mov $0, %rax" :: "i"(main as fn())); }
} Which indeed doesn't segfault (the linker complains about not not being able to relocate this in position-independent code instead). |
Remove deprecated LLVM-style inline assembly The `llvm_asm!` was deprecated back in rust-lang#87590 1.56.0, with intention to remove it once `asm!` was stabilized, which already happened in rust-lang#91728 1.59.0. Now it is time to remove `llvm_asm!` to avoid continued maintenance cost. Closes rust-lang#70173. Closes rust-lang#92794. Closes rust-lang#87612. Closes rust-lang#82065. cc `@rust-lang/wg-inline-asm` r? `@Amanieu`
Remove deprecated LLVM-style inline assembly The `llvm_asm!` was deprecated back in rust-lang#87590 1.56.0, with intention to remove it once `asm!` was stabilized, which already happened in rust-lang#91728 1.59.0. Now it is time to remove `llvm_asm!` to avoid continued maintenance cost. Closes rust-lang#70173. Closes rust-lang#92794. Closes rust-lang#87612. Closes rust-lang#82065. cc `@rust-lang/wg-inline-asm` r? `@Amanieu`
Remove deprecated LLVM-style inline assembly The `llvm_asm!` was deprecated back in rust-lang#87590 1.56.0, with intention to remove it once `asm!` was stabilized, which already happened in rust-lang#91728 1.59.0. Now it is time to remove `llvm_asm!` to avoid continued maintenance cost. Closes rust-lang#70173. Closes rust-lang#92794. Closes rust-lang#87612. Closes rust-lang#82065. cc `@rust-lang/wg-inline-asm` r? `@Amanieu`
Code
Meta
rustc --version --verbose
:rustc +stable --version --verbose
:Note that on stable
RUSTC_BOOTSTRAP=1
is needed to trigger the bugError output
Hmm. What should go here?
GDB Backtrace
I have no clue why this happens, but i guess writing a JIT in rust like this wasn't the smartest idea...
The text was updated successfully, but these errors were encountered: