Fixes #35658
Tested against the repro in the linked issue (adding a standalone test just to check that there's no UAF feels like it would be overkill, the compiler build.zig already uses b.addFmt so the code path itself has coverage).
Fixes #35658
Tested against the repro in the linked issue (adding a standalone test just to check that there's no UAF feels like it would be overkill, the compiler `build.zig` already uses `b.addFmt` so the code path itself has coverage).