skia2/gn
John Stiles 61e5e202a5 Enforce an upper bound on Runtime Effect program size.
The fuzzer is currently learning to make unboundedly-large programs by
nesting medium-size loops repeatedly. SkVM doesn't have a mechanism to
limit the ensuing explosion of code and ends up making unreasonably deep
stacks and/or unreasonably large programs.

SkSL now enforces an upper bound of approximately 100,000 IR nodes on a
fully-flattened, fully-inlined strict-ES2 program. The limit is picked
out of thin air, but this should be enough to prevent SkVM from going
haywire while still being large enough to handle any reasonable program.
We can definitely tune this value if we find that it is too large
(admitting dangerous code) or too small (rejecting good code).

Change-Id: I11735636175721fbc79460b4e194d8e4b42dc47d
Bug: skia:12396, oss-fuzz:37827, oss-fuzz:37837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444358
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-02 14:44:34 +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
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 more Ops to skgpu::v1 namespace 2021-09-02 13:25:29 +00:00
highest_version_dir.py
ios.gni Fix iOS build for skpinfo. 2021-06-18 20:53:06 +00:00
is_clang.py
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 Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +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