skia2/gn
John Stiles f89a8122a4 Fix flaws in minus-prefix optimization.
We had a logic bug when attempting to optimize the following code:
    const vecN x = vecN(a, b, c);
    -x;

The goal was to replace `-x` with `vecN(-a, -b, -c)` but we accidentally
tried to cast the `x` VariableReference to a Constructor. We
unfortunately didn't cover this in any of our test cases, but the fuzzer
managed to synthesize it by mixing and matching elements from its new
corpus.

This affected several different constructor types: splat, diagonal-
matrix, compound and array.

Change-Id: I10dd2460ab26ba3e820b0cff5db091368fb7e648
Bug: oss-fuzz:37764, oss-fuzz:37861
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443407
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-08-30 20:40:17 +00:00
..
portable Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
skia Enable variable-shadow warnings. 2021-08-16 18:06:06 +00:00
toolchain allow overriding {target,host}_link = ... in GN 2020-11-05 19:40:47 +00:00
__init__.py
bench.gni Non-substantive changes for making v1::SurfaceDrawContext V1-only 2021-08-02 19:22:58 +00:00
BUILDCONFIG.gn Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
call.py
checkdir.py
checkpath.py
codesign_ios.py Update code-signing script to have better error messages. 2020-11-09 18:41:36 +00:00
compile_ib_files.py
compile_sksl_tests.py Remove (unused) geometry shader support 2021-08-27 19:41:10 +00:00
copy_git_directory.py
core.gni Move GrBlockAllocator and GrTBlockList to src/core/ 2021-08-25 13:21:32 +00:00
cp.py Work around python 2 shutil.copy2 date bug 2020-09-28 20:12:13 +00:00
dehydrate_sksl.py quiet dehyrdate_sksl unless it fails 2021-01-08 18:14:29 +00:00
effects_imagefilters.gni Rudimentary SkRuntimeImageFilter 2021-06-09 21:46:24 +00:00
effects.gni Arithmetic blender 2021-07-08 17:06:17 +00:00
find_headers.py
find_msvc.py
find_xcode_sysroot.py
flutter_defines.gni rm flutter support for filterquality 2021-07-17 14:39:38 +00:00
fuchsia_defines.gni Enable new clip stack for Fuchsia 2020-10-12 20:41:03 +00:00
gen_plist_ios.py Add product bundle name to iOS Xcode projects 2020-11-16 16:00:56 +00:00
gm.gni Create test case to repro skia:12212. 2021-07-30 17:41:13 +00:00
gn_meta_sln.py
gn_to_bp_utils.py Update gn_to_bp_utils to support python3 2021-08-03 17:52:43 +00:00
gn_to_bp.py Ease HarfBuzz API change with feature detection 2021-08-06 17:22:22 +00:00
gn_to_cmake.py Fix CMakeLists to find Emscripten headers 2021-04-16 16:45:22 +00:00
gpu.gni Move GrAtlasTextOp to skgpu::v1 namespace 2021-08-30 14:56:55 +00:00
highest_version_dir.py
ios.gni Fix iOS build for skpinfo. 2021-06-18 20:53:06 +00:00
is_clang.py Fix is_clang python3 encoding errors 2020-06-26 18:41:00 +00:00
make_gm_gni.py
opts.gni
pdf.gni
push_to_android.py
rm.py
run_sksllex.py
samples.gni Prepare headers for making all ops V1-only 2021-08-12 15:09:11 +00:00
shared_sources.gni
skia.gni Ease HarfBuzz API change with feature detection 2021-08-06 17:22:22 +00:00
sksl_tests.gni Fix flaws in minus-prefix optimization. 2021-08-30 20:40:17 +00:00
sksl.gni Migrate function-body finalization out of IRGenerator. 2021-08-27 18:51:52 +00:00
tests.gni Move GrBlockAllocator and GrTBlockList to src/core/ 2021-08-25 13:21:32 +00:00
utils.gni OrderedFontMgr utility 2021-04-27 18:10:41 +00:00
xps.gni