Closed Bug 1214571 Opened 9 years ago Closed 9 years ago

Firefox Nightly 44.0a1 (2015-10-12) crashes in mozilla::dom::HTMLCanvasElement

Categories

(Core :: DOM: Core & HTML, defect)

44 Branch
x86_64
Windows 7
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla44
Tracking Status
firefox43 --- unaffected
firefox44 + verified

People

(Reporter: Virtual, Assigned: mtseng)

References

Details

(6 keywords, Whiteboard: [b2g-adv-main2.5-])

Crash Data

Attachments

(2 files)

Group: dom-core-security
Based on the crash stats, we have somehow missed to call HTMLCanvasElementObserver::Destroy() since HTMLCanvasElementObserver::HandleEvent calls OnVisibilityChange() on using a deleted mElement, if I read the stacks right. Raw pointer as a member variable bites again. HTMLCanvasElementObserver has HTMLCanvasElement* mElement;
Blocks: 709490
Summary: Firefox Nightly 44.0a1 (2015-10-13) crashes in mozilla::dom::HTMLCanvasElement → Firefox Nightly 44.0a1 (2015-10-12) crashes in mozilla::dom::HTMLCanvasElement
Btw, looks like it is possible that we create several HTMLCanvasElementObserver objects, but call Destroy on only one of them.
I also want to mention that I have these option set as "false" in about:config: -webgl.angle.try-d3d11 -webgl.can-lose-context-in-foreground -webgl.enable-debug-renderer-info -webgl.restore-context-when-visible and these to "true: -webgl.disable-angle -webgl.disable-extensions -webgl.disable-fail-if-major-performance-caveat -webgl.disabled to disable completely WebGL per security reasons and per not using it.
(In reply to Olli Pettay [:smaug] from comment #2) > Btw, looks like it is possible that we create several > HTMLCanvasElementObserver objects, but call > Destroy on only one of them. HTMLCanvasElementObserver calls Destroy in its DTOR. But yes, we should check if we already have an existing mContextObserver.
(In reply to Olli Pettay [:smaug] from comment #1) > Raw pointer as a member variable bites again. > HTMLCanvasElementObserver has HTMLCanvasElement* mElement; Sigh. :( I should land my analysis soon...
Attached file testcase (deleted) —
Not 100% reliable testcase, since it depends on CC/GC scheduling, but seems to crash locally usually in HTMLCanvasElement::OnVisibilityChange() But hopefully it helps figuring out the right patch for this. c.getContext("webgl", { get stencil() { throw "hahaa"; } }); creates an HTMLCanvasElementObserver which c.getContext("webgl", { stencil: false }); then overrides.
Sorry for crashing nightly. Here is patch to prevent create too much mContextObserver.
Attachment #8674021 - Flags: review?(bugs)
Attachment #8674021 - Flags: review?(bugs) → review+
Assignee: nobody → mtseng
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Verified as FIXED with (2015-10-17) build. Thank you very much. \o/
Status: RESOLVED → VERIFIED
Crash Signature: [@ mozilla::dom::HTMLCanvasElement::OnVisibilityChange() ] [@ mozilla::dom::HTMLCanvasElementObserver::UnregisterVisibilityChangeEvent() ] → [@ mozilla::dom::HTMLCanvasElement::OnVisibilityChange() ] [@ mozilla::dom::HTMLCanvasElement::OnVisibilityChange ] [@ mozilla::dom::HTMLCanvasElementObserver::UnregisterVisibilityChangeEvent() ]
Group: dom-core-security → core-security-release
Can someone suggest a security rating for this issue?
Flags: sec-bounty?
See the change after https://bugzilla.mozilla.org/show_bug.cgi?id=1214571#c1 sec-critical because of accessing a deleted object.
Group: core-security-release
Flags: sec-bounty? → sec-bounty+
Whiteboard: [b2g-adv-main2.5-]
Attachment #8685000 - Attachment description: bernesb@gmail.com,3000?,2015-10-14,2015-10-16,2015-11-09,true,Artur Osiński,, → bernesb@gmail.com,3000?,2015-10-14,2015-10-16,2015-11-09,true,Artur Osiński (Virtual_ManPL),,
Attachment #8685000 - Attachment description: bernesb@gmail.com,3000?,2015-10-14,2015-10-16,2015-11-09,true,Artur Osiński (Virtual_ManPL),, → bernesb@gmail.com,3000,2015-10-14,2015-10-16,2015-11-09,true,Artur Osiński (Virtual_ManPL),,
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: