Code
#![feature(asm)]
#[inline(always)]
fn f() {
unsafe {
asm!("test: nop");
}
}
fn main() {
f();
f();
}
Meta
rustc 1.46.0-nightly (346aec9b0 2020-07-11)
binary: rustc
commit-hash: 346aec9b02f3c74f3fce97fd6bda24709d220e49
commit-date: 2020-07-11
host: x86_64-pc-windows-msvc
release: 1.46.0-nightly
LLVM version: 10.0
Error output
error: invalid symbol redefinition
--> .\crash.rs:6:15
|
6 | asm!("test: nop");
| ^
|
note: instantiated into assembly here
--> <inline asm>:2:2
|
2 | test: nop
| ^
[crash due to null dereference]
Details
This bug only happens when compiling for Windows target with debug information. Command to reproduce crash:
rustc crash.rs --target x86_64-pc-windows-msvc -g
It was identified by eddyb that crash happens in LLVM function WinCOFFObjectWriter::assignFileOffsets.
Code
Meta
Error output
Details
This bug only happens when compiling for Windows target with debug information. Command to reproduce crash:
It was identified by eddyb that crash happens in LLVM function WinCOFFObjectWriter::assignFileOffsets.