Skip to content

rustc segfaults on global_asm!("jz [foo]") on x86_64-pc-windows-msvc (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) #135362

Open
@Trolldemorted

Description

@Trolldemorted

Code

use std::arch::global_asm;
global_asm!("jz [0x00547274]");

No other lines of code, no dependencies. Other code (also with global_asm!) builds fine.

Meta

rustc --version --verbose:

rustc 1.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: x86_64-pc-windows-msvc
release: 1.84.0
LLVM version: 19.1.5

Error output

PS C:\Users\Benni\rustccrash> cargo build
   Compiling rustccrash v0.1.0 (C:\Users\Benni\rustccrash)
error: could not compile `rustccrash` (lib)

Caused by:
  process didn't exit successfully: `C:\Users\Benni\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name rustccrash --edition=2021 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=241 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs) --check-cfg "cfg(feature, values())" -C metadata=c9c8a2735a047fdf -C extra-filename=-c9c8a2735a047fdf --out-dir 
C:\Users\Benni\rustccrash\target\debug\deps -C incremental=C:\Users\Benni\rustccrash\target\debug\incremental -L dependency=C:\Users\Benni\rustccrash\target\debug\deps` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-windowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions