61e5e202a5
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> |
||
---|---|---|
.. | ||
portable | ||
skia | ||
toolchain | ||
__init__.py | ||
bench.gni | ||
BUILDCONFIG.gn | ||
call.py | ||
checkdir.py | ||
checkpath.py | ||
codesign_ios.py | ||
compile_ib_files.py | ||
compile_sksl_tests.py | ||
copy_git_directory.py | ||
core.gni | ||
cp.py | ||
dehydrate_sksl.py | ||
effects_imagefilters.gni | ||
effects.gni | ||
find_headers.py | ||
find_msvc.py | ||
find_xcode_sysroot.py | ||
flutter_defines.gni | ||
fuchsia_defines.gni | ||
gen_plist_ios.py | ||
gm.gni | ||
gn_meta_sln.py | ||
gn_to_bp_utils.py | ||
gn_to_bp.py | ||
gn_to_cmake.py | ||
gpu.gni | ||
highest_version_dir.py | ||
ios.gni | ||
is_clang.py | ||
make_gm_gni.py | ||
opts.gni | ||
pdf.gni | ||
push_to_android.py | ||
rm.py | ||
run_sksllex.py | ||
samples.gni | ||
shared_sources.gni | ||
skia.gni | ||
sksl_tests.gni | ||
sksl.gni | ||
tests.gni | ||
utils.gni | ||
xps.gni |