7253a201a3
The fuzzer noticed insufficient guards in IndexExpression::Convert when converting an array size from an IntLiteral to a SKSL_INT. We had code in IRGenerator which did this properly, so I moved our array-size conversion logic into SkSLType and had IndexExpression share it. Also, a variety of tests around similar error conditions were added. Change-Id: I51529dea25f9029f81ae236511610069d66be29f Bug: oss-fuzz:37462 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441236 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
22 lines
752 B
GLSL
22 lines
752 B
GLSL
### Compilation failed:
|
|
|
|
error: 1: array size must be positive
|
|
error: 2: array size must be positive
|
|
error: 3: array size must be positive
|
|
error: 4: expected 'int', but found 'float'
|
|
error: 5: array size is too large
|
|
error: 6: expected 'int', but found 'bool'
|
|
error: 7: expected 'int', but found 'bool'
|
|
error: 8: expected 'int', but found 'int2'
|
|
error: 9: array must have a size
|
|
error: 10: array size must be positive
|
|
error: 11: array size must be positive
|
|
error: 12: array size must be positive
|
|
error: 13: expected 'int', but found 'float'
|
|
error: 14: array size is too large
|
|
error: 15: expected 'int', but found 'bool'
|
|
error: 16: expected 'int', but found 'bool'
|
|
error: 17: expected 'int', but found 'int2'
|
|
error: 18: array must have a size
|
|
18 errors
|