diff options
| author | kcbanner <kcbanner@gmail.com> | 2024-07-13 17:46:24 -0400 |
|---|---|---|
| committer | kcbanner <kcbanner@gmail.com> | 2024-07-13 17:46:24 -0400 |
| commit | bc28454b43b717dee47cf8c1a1abfb7e8ad09a1e (patch) | |
| tree | 5b451406f50bd24cf9e357a0ff2af788a1798ac5 /src/InternPool.zig | |
| parent | 11534aa34d6e9c66081eb2918bfaacbb21db0e56 (diff) | |
| download | zig-bc28454b43b717dee47cf8c1a1abfb7e8ad09a1e.tar.gz zig-bc28454b43b717dee47cf8c1a1abfb7e8ad09a1e.zip | |
zig.h: replace `_InterlockedExchangeAdd` with a plain volatile load
This was causing zig2.exe to crash during bootstrap, because there was an atomic
load of read-only memory, and the attempt to write to it as part of the (idempotent)
atomic exchange was invalid.
Aligned reads (of u32 / u64) are atomic on x86 / x64, so this is replaced with an
optimization-proof load (`__iso_volatile_load8*`) and a reordering barrier.
Diffstat (limited to 'src/InternPool.zig')
0 files changed, 0 insertions, 0 deletions
