Go to file
John Stiles 48b27317b4 Fix fuzzer-discovered error with range checks.
The fuzzer managed to create a NaN using a carefully-crafted mix of
intrinsics and constant folding. (`cosh(421)` is a very large double,
which becomes +Inf when cast to float, which is then multiplied by 0;
zero times infinity is NaN.)

Our code which checked to see if a value is in range of an int did not
consider NaNs and their always-false behavior, so it incorrectly
decided that NaN was in range. This CL reverses the check so that a NaN
will not pass, but all other values will behave the same.

Followup CLs should probably also tighten up the folding/optimizer
behavior so that NaNs/Infs are not created at all.

Change-Id: Idd2b0447ebe115e00bdba63ca7ff655f6c902fc6
Bug: oss-fuzz:48592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555009
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-06 14:24:59 +00:00
bazel Add --keep_going to IWYU enforcement 2022-07-01 13:03:51 +00:00
bench [graphite] Add HybridBoundsManager and use as default impl 2022-06-21 15:52:22 +00:00
bin Update SKPs documentation link 2022-05-18 15:21:44 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides Manual Dawn Roll 2022-06-23 12:39:45 +00:00
client_utils/android Revert "Move SkCamera.h to client_utils/android" 2022-04-25 12:33:01 +00:00
demos.skia.org Pin canvaskit used in demos 2022-06-24 19:59:24 +00:00
dm Reland "Replace SK_ARRAY_COUNT with std::size() all the rest" 2022-07-01 16:20:51 +00:00
docker Update Perfetto reference following fix for b/234001590 2022-06-16 15:16:55 +00:00
docs/examples Replace SK_ARRAY_COUNT with std::size() for skia/docs 2022-06-16 20:09:58 +00:00
example reland "set up GL sample app to build through Bazel Mac toolchain" 2022-06-21 19:22:16 +00:00
experimental [bazel] Use exec_tools instead of tools for better RBE compatibility 2022-06-30 18:02:35 +00:00
fuzz Reland "Replace SK_ARRAY_COUNT with std::size() all the rest" 2022-07-01 16:20:51 +00:00
gm Update SkMesh buffer API to take const void* instead of SkData 2022-07-01 20:07:57 +00:00
gn Fix fuzzer-discovered error with range checks. 2022-07-06 14:24:59 +00:00
include Update SkMesh buffer API to take const void* instead of SkData 2022-07-01 20:07:57 +00:00
infra Update SKP version 2022-07-03 08:24:12 +00:00
modules Remove extra file 2022-07-01 16:55:23 +00:00
platform_tools Enable inline/datauri image support for SkottieView 2022-06-27 19:54:24 +00:00
resources Fix fuzzer-discovered error with range checks. 2022-07-06 14:24:59 +00:00
samplecode Replace SK_ARRAY_COUNT with std::size() for skia/samplecode 2022-06-22 14:02:56 +00:00
site [docs] Fix SkCanvas Creation API 2022-06-30 13:11:31 +00:00
specs [infra] Port serve.py from Python2 to 3 2021-08-31 15:28:19 +00:00
src Fix fuzzer-discovered error with range checks. 2022-07-06 14:24:59 +00:00
tests Fix fuzzer-discovered error with range checks. 2022-07-06 14:24:59 +00:00
third_party [bazel] Use exec_tools instead of tools for better RBE compatibility 2022-06-30 18:02:35 +00:00
toolchain Reland "Replace SK_ARRAY_COUNT with std::size() all the rest" 2022-07-01 16:20:51 +00:00
tools Make copy of skcms checkout in //modules/skcms 2022-06-30 12:05:13 +00:00
.bazelrc [bazel] Add option for SkSVGCanvas (and expat third_party DEP) 2022-06-27 15:56:55 +00:00
.bazelversion Reland "[bazel] Update to v5.2.0" 2022-06-21 18:49:10 +00:00
.clang-format no more bin packing in .clang-format 2021-03-04 17:22:50 +00:00
.clang-tidy Disable ClangTidy namespace comments for short blocks. 2020-08-24 14:01:22 +00:00
.gitignore [infra] Add BazelBuild task to build CanvasKit on the CI with Bazel 2022-05-06 17:54:08 +00:00
.gn Disable wayland in ANGLE 2022-06-15 18:24:40 +00:00
.vpython [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
AUTHORS Add mike@reedtribe.org to AUTHORS 2022-05-19 12:49:11 +00:00
BUILD.bazel [bazel] Make modules depend on //:skia_internal 2022-06-24 17:01:56 +00:00
BUILD.gn Make copy of skcms checkout in //modules/skcms 2022-06-30 12:05:13 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll ANGLE from 86c735bfe650 to 9070e279a887 (5 revisions) 2022-07-06 05:54:24 +00:00
DIR_METADATA Move metadata in OWNERS files to DIR_METADATA files 2021-02-02 23:41:54 +00:00
go_repositories.bzl [infra] Update dep of infra repo 2022-04-28 13:20:10 +00:00
go.mod [infra] Update dep of infra repo 2022-04-28 13:20:10 +00:00
go.sum [infra] Fix go.sum 2022-04-28 18:01:34 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS [infra] Add wildcard OWNERS 2021-08-30 19:19:34 +00:00
OWNERS.android Update OWNERS.android with more details 2022-03-16 18:13:33 +00:00
package-lock.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
package.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
PRESUBMIT.py [bazel] Add support for Macs to make Linux RBE builds 2022-06-23 12:00:43 +00:00
public.bzl [graphite] Add compile guards to precompile system (take 2) 2022-06-29 19:37:15 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Make copy of skcms checkout in //modules/skcms 2022-06-30 12:05:13 +00:00
requirements.txt Added expected hash for MarkupSafe for the MacOS platform with the M1 chip 2022-05-19 17:54:32 +00:00
whitespace.txt Push shaders.skia.org. 2022-01-19 21:46:16 +00:00
WORKSPACE.bazel [bazel] Use exec_tools instead of tools for better RBE compatibility 2022-06-30 18:02:35 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.