Closed Bug 1305151 Opened 3 years ago Closed 3 years ago

Allow disabling of Skia asserts in debug builds

Categories

(Core :: Graphics, defect, P3)

51 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 3 open bugs)

Details

(Keywords: feature, Whiteboard: [gfx-noted])

Attachments

(1 file)

It is very easy to trip up Skia debug asserts by stressing numerical precision. Skia extensively uses single-precision floats throughout, and debug code is similarly scattered about that will usually fail when this precision is stressed because it only expects to be provided with sane use-cases (i.e. ones that are actually renderable). The consequences of most of these asserts failing is simply that things will fail to render, or maybe just look a little bit off.

This Skia debug code is antagonistic with our fuzzer efforts, since the fuzzers will often trip up in Skia, when what we really want to catch is bugs in our own code, or crashes that occur under our normal test infrastructure.

One possible way to resolve this antagonism is to give the fuzzer a way to disable Skia's assertions at runtime. We could do this via an env-var such as MOZ_SKIA_DISABLE_ASSERTS which the fuzzer can supply. This would not affect our normal test infrastructure or releases since it would not be defined there.
Attachment #8794400 - Flags: review?(milan)
Comment on attachment 8794400 [details] [diff] [review]
allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var

Review of attachment 8794400 [details] [diff] [review]:
-----------------------------------------------------------------

I can live with this.
Attachment #8794400 - Flags: review?(milan) → review+
Blocks: 1305074, 1305090
Should I continue to log the skia assertions as they come up? They aren't really getting in the way at the moment. That said they may be a pain to fix on the dev side.
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c645653db8c
allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var. r=milan
(In reply to Tyson Smith [:tsmith] from comment #2)
> Should I continue to log the skia assertions as they come up? They aren't
> really getting in the way at the moment. That said they may be a pain to fix
> on the dev side.

Whatever you already found/filed, just do as usual. For new ones, I recommend you define MOZ_SKIA_DISABLE_ASSERTS=1 in the env so that it will only catch actual crashes in Skia from now on.
Blocks: 1305267
https://hg.mozilla.org/mozilla-central/rev/2c645653db8c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Blocks: 1371946
Blocks: 1228128
You need to log in before you can comment on or make changes to this bug.