Antonio Maiorano 17e83de54f Fix UB when parsing HexFloat with large exponents
During HexFloat parsing, if exponent was too large, we would overflow
the signed integer being used to store its value. We now use an uint32_t
to avoid UB, then convert to int32_t when it's safe to do so.

Also error out if the input exponent is > INT_MAX - 127, which ensures
we will not wrap around and produce an invalid result when adding the
exponent bias of 127.

Bug: chromium:1240048
Bug: tint:1150
Change-Id: I1b57b2c965358b803ebb68ea70b76e759cdd3939
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63120
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-09-03 19:40:36 +00:00
..
2021-08-26 15:26:25 +00:00
2021-05-14 17:51:13 +00:00
2021-07-14 18:42:02 +00:00
2021-08-26 15:26:25 +00:00
2021-05-20 15:10:48 +00:00
2021-07-29 19:55:35 +00:00
2021-07-29 19:55:35 +00:00
2021-03-09 11:11:17 +00:00
2021-06-09 20:17:59 +00:00