Added reportPendingErrors to SkSL code generation
This fixes an assertion failure uncovered by the fuzzer. Bug: oss-fuzz:37469 Change-Id: I626c003cfa8a0bc65851899df3a7695dbe29200b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441311 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
bb447be35a
commit
553239bc12
@ -188,6 +188,7 @@ sksl_spirv_tests = [
|
||||
"/sksl/spirv/Ossfuzz35916.sksl",
|
||||
"/sksl/workarounds/RewriteMatrixVectorMultiply.sksl",
|
||||
"/sksl/errors/Ossfuzz36850.sksl",
|
||||
"/sksl/errors/Ossfuzz37469.sksl",
|
||||
"/sksl/errors/UndefinedFunction.sksl",
|
||||
"/sksl/errors/UnusedInterfaceBlock.sksl",
|
||||
]
|
||||
|
1
resources/sksl/errors/Ossfuzz37469.sksl
Normal file
1
resources/sksl/errors/Ossfuzz37469.sksl
Normal file
@ -0,0 +1 @@
|
||||
k{int z;}m[];void main(){}
|
@ -3789,6 +3789,7 @@ bool SPIRVCodeGenerator::generateCode() {
|
||||
this->writeWord(fIdCount, *fOut);
|
||||
this->writeWord(0, *fOut); // reserved, always zero
|
||||
write_stringstream(buffer, *fOut);
|
||||
fContext.fErrors->reportPendingErrors(PositionInfo());
|
||||
return fContext.fErrors->errorCount() == 0;
|
||||
}
|
||||
|
||||
|
4
tests/sksl/errors/Ossfuzz37469.asm.frag
Normal file
4
tests/sksl/errors/Ossfuzz37469.asm.frag
Normal file
@ -0,0 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: runtime-sized arrays are not supported in SPIR-V
|
||||
1 error
|
Loading…
Reference in New Issue
Block a user