commit | ecd03db1e840235af00ddb771b0b457eb5824c57 | [log] [tgz] |
---|---|---|
author | Andy Weiss <dragonbear@google.com> | Wed Aug 28 08:46:43 2019 -0700 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Aug 28 16:25:25 2019 +0000 |
tree | 18e417f3a139200a1ee63ef2edd1c3755f21a4ed | |
parent | 63b4d5880a5bb3553ce9283400152fa5ed9821f6 [diff] |
Override operator delete for GrCpuBuffer GrCpuBuffer allocates extra space for a buffer in Make but using sized delete will then lead to UB as operator delete is not implemented. This change overrides the delete operator to force the unsized variant which gets rid of the UB at the cost of not taking advantage of sized delete. Once P0722R1 is available to safely compute the full size of the object inside delete, this code can change to use sized delete. c.f. https://bugs.chromium.org/p/skia/issues/detail?id=6384 and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0722r1.html Change-Id: I8f9172c35d17a5acee777d802dfdb25f031868b4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237847 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>