Closed Bug 1156582 Opened 9 years ago Closed 9 years ago

Crash [@ mozilla::webgl::ShaderValidator::CanLinkTo]

Categories

(Core :: Graphics: CanvasWebGL, defect)

38 Branch
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: jruderman, Assigned: lsalzman)

Details

(Keywords: crash, testcase, Whiteboard: [gfx-noted] [testday-20150821])

Attachments

(3 files)

Attached file testcase
      No description provided.
Attached file stack
Confirmed to at least affect 38:

https://crash-stats.mozilla.com/report/index/ff607356-74fc-4ee9-881f-a2ff52150521
Flags: needinfo?(jgilbert)
OS: Mac OS X → All
Hardware: x86_64 → All
Whiteboard: [gfx-noted]
Version: Trunk → 38 Branch
In WebGLShader, mTranslationSuccessful and mCompilationSuccessful are bools that never get initialized anywhere, so their values are just random junk. The only place they were getting first set is in CompileShader. In the test case, a vertex shader is created with no source/not compiled, and attached to a program. Because these bools contain junk, LinkProgram thinks the vertex shader was compiled when it was not, allowing it to get deeper in the code than it should have and causing a crash deeper in derefing a null mValidator.

Thus, this patch fixes it by simply initializing these bools to false, so it never mistakenly assumes the vertex shader was compiled.
Assignee: nobody → lsalzman
Attachment #8613174 - Flags: review?(jgilbert)
Attachment #8613174 - Flags: review?(jgilbert) → review+
Keywords: checkin-needed
can we get a try run for this, thanks!
Flags: needinfo?(lsalzman)
Keywords: checkin-needed
(In reply to Carsten Book [:Tomcat] from comment #4)
> can we get a try run for this, thanks!

https://treeherder.mozilla.org/#/jobs?repo=try&revision=2c39507c45ec
Flags: needinfo?(lsalzman)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/21b703601d17
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Flags: needinfo?(jgilbert)
QA Whiteboard: [good first verify]
Reproduce on Firefox nightly 40.0a1 (2015-04-20) with windows 7 64 bit

The bug's fix is verified on latest beta 41.0b3 (Build ID : 20150820142145)
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:41.0) Gecko/20100101 Firefox/41.0
Whiteboard: [gfx-noted] → [gfx-noted] [testday-20150821]
You need to log in before you can comment on or make changes to this bug.