aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorMarc Tiehuis <marc@tiehu.is>2024-02-25 19:15:22 +1300
committerAndrew Kelley <andrew@ziglang.org>2024-02-25 12:37:03 -0800
commitff3bf983459c5c58ec0374f6f52627902f13e721 (patch)
tree3bd084aa161643c696dc0441b0b7e04bec836459 /src/codegen/spirv.zig
parent08e886b8fec4c51366517b1c1d52d588c24abb4f (diff)
downloadzig-ff3bf983459c5c58ec0374f6f52627902f13e721.tar.gz
zig-ff3bf983459c5c58ec0374f6f52627902f13e721.zip
fix large f128 values being incorrectly parsed as inf
Found while fuzzing. Previously 1.1897314953572317650857593266280070162E4932 was parsed as +inf, which caused issues for round-trip serialization of floats. Only f128 had issues, but have added other tests for all floating point large normals. The max_exponent for f128 was wrong, it is subtly different in the decimal code-path as it is based on where the decimal digit should go. This needs to be 2 greater than the max exponent (e.g. 308 or 4932) to work correctly (greater by 1, then we use a >= comparision). In addition, I've removed the redundant `optimize` constant which was only use for testing the slow path locally.
Diffstat (limited to 'src/codegen/spirv.zig')
0 files changed, 0 insertions, 0 deletions