Contents from global_asm! leak into other assemblies #81838
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-bug
Category: This is a bug.
F-asm
`#![feature(asm)]` (not `llvm_asm`)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
In code like this as noted here
the macro will leak into the inline
asm!
, but this is likely extremely brittle. For instance, Rust is free to split this module into 2 distinct CGUs, making the code like this mysteriously work or break.This could probably be mitigated by isolating all the
global_asm!
into its own CGU – that way none of the inline asm invocations would be able to observe theglobal_asm!
stuff. Alternatively, if we find we want to support this behaviour we would be forced to collect all uses ofglobal_asm!
and items containing inline asm in a crate into a single CGU. Supporting this would also have implications to alternative backend support.cc #35119
The text was updated successfully, but these errors were encountered: