Make the footer big to handle bug 684061.

R=mtklein@google.com

BUG=chromium:684061

Change-Id: I210ca93e00ec6fa5d166c0fde5cdcff0f60c26ca
Reviewed-on: https://skia-review.googlesource.com/7450
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Herb Derby 2017-01-24 15:59:51 -05:00 committed by Skia Commit-Bot
parent bfd97c5935
commit c4e6cfe562
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ void SkArenaAlloc::reset() {
void SkArenaAlloc::installFooter(FooterAction* releaser, ptrdiff_t padding) { void SkArenaAlloc::installFooter(FooterAction* releaser, ptrdiff_t padding) {
ptrdiff_t releaserDiff = (char *)releaser - (char *)end_chain; ptrdiff_t releaserDiff = (char *)releaser - (char *)end_chain;
ptrdiff_t footerData = SkLeftShift((int64_t)releaserDiff, 5) | padding; ptrdiff_t footerData = SkLeftShift((int64_t)releaserDiff, 5) | padding;
if (padding >= 32 || !SkTFitsIn<int32_t>(footerData)) { if (padding >= 32 || !SkTFitsIn<Footer>(footerData)) {
// Footer data will not fit. // Footer data will not fit.
SkFAIL("Constraints are busted."); SkFAIL("Constraints are busted.");
} }

View File

@ -118,7 +118,7 @@ public:
void reset(); void reset();
private: private:
using Footer = int32_t; using Footer = int64_t;
using FooterAction = char* (char*); using FooterAction = char* (char*);
static char* SkipPod(char* footerEnd); static char* SkipPod(char* footerEnd);