This website requires JavaScript.
ReeceSX
Explore
Aurora
Register
Sign In
AuroraMiddleware
/
skia2
Watch
1
Star
0
Fork
0
You've already forked skia2
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
73122aa45f
skia2
/
tests
/
sksl
/
errors
/
OverflowUintLiteral.glsl
5 lines
76 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Detect and report numeric overflows in the SkSL parser. Previously, some types of overflow were detected, but most would assert or silently generate invalid code. Now, the parser will properly report an error if it encounters any integer that exceeds UINT_MAX or any float that exceeds FLT_MAX. This fixes test OverflowUintLiteral.sksl. Added a test for floats as well, OverflowFloatLiteral.sksl. OverflowIntLiteral.sksl does not fail yet, because its values are larger than INT_MAX, not UINT_MAX. These are legal from the perspective of the parser. This must be caught later at IR generation time. Change-Id: Ia5a904d01427cdc9f2ab5f4174154418737835e6 Bug: skia:10932 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347176 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-23 23:58:43 +00:00
### Compilation failed:
Add unit tests for overflowing int and uint literal limits. At present, we do not report any error; the values wrap silently. Change-Id: I8c435cfdd81f6c2e5fd87e9c39c708138bf4ec82 Bug: skia:10932 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333676 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-11-10 19:17:42 +00:00
Detect and report numeric overflows in the SkSL parser. Previously, some types of overflow were detected, but most would assert or silently generate invalid code. Now, the parser will properly report an error if it encounters any integer that exceeds UINT_MAX or any float that exceeds FLT_MAX. This fixes test OverflowUintLiteral.sksl. Added a test for floats as well, OverflowFloatLiteral.sksl. OverflowIntLiteral.sksl does not fail yet, because its values are larger than INT_MAX, not UINT_MAX. These are legal from the perspective of the parser. This must be caught later at IR generation time. Change-Id: Ia5a904d01427cdc9f2ab5f4174154418737835e6 Bug: skia:10932 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347176 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-23 23:58:43 +00:00
error: 4: integer is too large: 4294967296
1 error
Reference in New Issue
Copy Permalink