Skip to content

Commit

Permalink
DLOG instead of DCHECK destruction during write access
Browse files Browse the repository at this point in the history
This is motivated by our fuzzing of RasterDecoder. The fuzzer
can issue a BeginRasterCHROMIUM without a matching EndRasterCHROMIUM.
The DCHECK was causing clusterfuzz to think it found an legit error.

It is possible for a renderer to crash between BeginRaster and EndRaster
as well.

Bug: 940190
Change-Id: Ia260b626ce516a700fc1159e4be33c7adb02740c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1518144
Commit-Queue: Jonathan Backer <backer@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Auto-Submit: Jonathan Backer <backer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640365}
  • Loading branch information
Jonathan Backer authored and Commit Bot committed Mar 13, 2019
1 parent 7aba201 commit 7427f77
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,12 @@ class SharedImageRepresentationSkiaImpl : public SharedImageRepresentationSkia {
#endif
}

~SharedImageRepresentationSkiaImpl() override { DCHECK(!write_surface_); }
~SharedImageRepresentationSkiaImpl() override {
if (write_surface_) {
DLOG(ERROR) << "SharedImageRepresentationSkia was destroyed while still "
<< "open for write access.";
}
}

sk_sp<SkSurface> BeginWriteAccess(
GrContext* gr_context,
Expand Down

0 comments on commit 7427f77

Please sign in to comment.