aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkMalloc.h
Commit message (Collapse)AuthorAge
* Add 2 fuzz targets for image decoding (oss-fuzz)Gravatar Kevin Lubick2018-02-12
| | | | | | | | | | | This also adds in a few small guards to prevent libfuzzer from frequently running out of memory when an image claims to have billions of pixels. Bug: skia: Change-Id: I47a9daac832c4d85a42000698482b61721c38880 Reviewed-on: https://skia-review.googlesource.com/106264 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* remove guarded old malloc codeGravatar Mike Reed2018-01-07
| | | | | | | | Bug: skia: Change-Id: I045e3816f04accebffd86c4aaaa5da67f198186c Reviewed-on: https://skia-review.googlesource.com/91405 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* begin cleanup of malloc porting layerGravatar Mike Reed2018-01-05
| | | | | | | | | | | | | | 1. Merge some of the allocators into sk_malloc_flags by redefining a flag to mean zero-init 2. Add more private helpers to simplify our call-sites (and handle some overflow mul checks) 3. The 2-param helpers rely on the saturating SkSafeMath::Mul to pass max_size_t as the request, which should always fail. Bug:508641 Change-Id: I322f1e6ed91113467e0fdb12c91c3dad33d890c8 Reviewed-on: https://skia-review.googlesource.com/90940 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Stephan Altmueller <stephana@google.com>
* don't include SkMalloc.h from SkTypes.hGravatar Mike Reed2018-01-04
| | | | | | | | | | | | Needed chrome CLs https://chromium-review.googlesource.com/c/chromium/src/+/850741 https://chromium-review.googlesource.com/c/chromium/src/+/850920 Bug: skia: Change-Id: Ic568174a56590a65bfa284c59fd104275ee78da9 Reviewed-on: https://skia-review.googlesource.com/90823 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove uses of sk_throw.Gravatar Ben Wagner2017-08-17
| | | | | | | | | | | The sk_throw macro is now an alias to SK_ABORT, but is often used when other macros better describe the situation. This change replaces sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate. Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3 Reviewed-on: https://skia-review.googlesource.com/35882 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Change SkMemory to the more accurately named SkMalloc.Gravatar Herb Derby2017-03-27
Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>