skia2/tests/sksl
John Stiles fabed8bb79 Fix fuzzer-discovered error with variable declarations.
As soon as a single VarDeclaration is successfully created, its Variable
is added to the current symbol table. However, if a variable-declaration
line declared several variables in a row, we would stop if ANY of the
declarations contained an error and discard the entire statement, but
would continue processing the rest of the program. This left us in a
position where some Variables existed in the SymbolTable with valid,
reachable names, but their corresponding VarDeclaration statement had
been thrown away as erroneous. Since Variables point back to
VarDeclarations for their initialValues, this gave us a stale pointer.
Any future reference to that variable name which could trigger an
access to its initialValue would read from this dead pointer.

This CL fixes the conversion of VarDeclarations so that we no longer
throw away any VarDeclarations associated with a successfully-parsed
Variable.

Change-Id: If8ec3c160933e48a0e1f36414234b3a849d8978c
Bug: oss-fuzz:32587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389636
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-29 14:35:09 +00:00
..
blend Revert "Revert "Added more RelaxedPrecision decorations"" 2021-03-23 19:34:42 +00:00
errors Fix fuzzer-discovered error with variable declarations. 2021-03-29 14:35:09 +00:00
folding Mangle function names in GLSL. 2021-03-22 17:18:26 +00:00
fp Add new style key information to several core effects 2021-03-04 14:49:07 +00:00
glsl Remove specific blend mode layout qualifiers 2021-02-23 15:45:55 +00:00
inliner Run SkSL inliner tests as part of dm. 2021-03-25 22:58:54 +00:00
intrinsics Revert "Revert "Added more RelaxedPrecision decorations"" 2021-03-23 19:34:42 +00:00
metal Mangle function names in Metal. 2021-03-22 17:23:21 +00:00
runtime Revert "Inline functions of the form 'return (expr)' only." 2021-03-15 22:08:48 +00:00
runtime_errors Optimize away no-op arithmetic in ConstantFolder. 2021-03-06 01:33:35 +00:00
shared Convert division-by-literal in SPIR-V to multiplication. 2021-03-26 02:30:54 +00:00
spirv Revert "Revert "Added more RelaxedPrecision decorations"" 2021-03-23 19:34:42 +00:00
workarounds Rewrite matrix * vector multiplication on ARM GPUs. 2021-03-24 19:21:44 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.