// Stream B1 (fibers) step B1.0a — regression for an adversarial-review finding. // // `abi(.pure)` on a GENERIC function is monomorphized through a different // Function-creation path (lower/generic.zig) than a plain decl, and originally // that path left `is_pure` unset — so the emit bail never fired and a framed // body shipped (it "returned 42" but leaked the prologue's stack adjustment: // the exact silent corruption the lock exists to prevent). This example pins // the now-correct behavior: a `.pure` generic instance reaches the loud emit // bail (build-gating, nonzero exit) just like a plain `.pure` decl. The sibling // pack-expansion path (lower/pack.zig) was hardened the same way. Host- // independent (the bail fires before instruction selection), so no `.build` // pin. B1.0b will turn the plain-decl form (1800) green; this generic case // stays a bail-lock (a naked generic is exotic and out of B1's scope). answer :: ($T: Type) -> i64 abi(.pure) { asm volatile { #string A mov x0, #42 ret A }; } main :: () -> i64 { return answer(i64); }