Allow disabling of Skia asserts in debug builds

RESOLVED FIXED in Firefox 52

Status

()

Core
Graphics
P3
normal
RESOLVED FIXED
2 years ago
8 months ago

People

(Reporter: lsalzman, Assigned: lsalzman)

Tracking

(Blocks: 3 bugs, {feature})

51 Branch
mozilla52
feature
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8794400 [details] [diff] [review]
allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var

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+
(Assignee)

Updated

2 years ago
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.

Comment 3

2 years ago
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
(Assignee)

Comment 4

2 years ago
(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.
(Assignee)

Updated

2 years ago
Blocks: 1305267

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2c645653db8c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
(Assignee)

Updated

a year ago
Blocks: 1371946
(Assignee)

Updated

8 months ago
Blocks: 1228128
You need to log in before you can comment on or make changes to this bug.