Closed Bug 1568395 Opened 5 years ago Closed 5 years ago

Add back "MEH: malicious process?" error messages for WR DL deserializer

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: Gankra, Assigned: Gankra)

Details

Attachments

(1 file)

These got lost in the jump to peek-poke, and were very nice for (more) easily identifying the issue at hand. In particular we should probably add back the enum discriminant check's message, as this is one we get in the wild when we have a memory corruption.

https://searchfox.org/mozilla-central/source/gfx/wr/peek-poke/peek-poke-derive/src/lib.rs#128

The old error message wasn't especially helpful because I was picturing this assert only ever being tripped in a malicious context -- underestimating memory corruption.

Ideally the new message would be like:

"WRDL: memory corruption detected while parsing {type_name} - discriminant should be <= {max_value}, but was {actual_value}"

It would also be nice if we added a message to the asserts in the main lib:

https://searchfox.org/mozilla-central/source/gfx/wr/peek-poke/src/lib.rs#56

This one can be vaguer since I doubt we'll hit it as much. Something just like:

"WRDL: unexpected end of display list"

(maybe give each assert a slightly unique string so we can find which one was tripped more easily)

Priority: -- → P3
Assignee: nobody → a.beingessner
Pushed by abeingessner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fd57b600fcba
Add more useful error messages to webrender_api. r=kamidphish
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: