Closed
Bug 1186689
Opened 9 years ago
Closed 9 years ago
"Assertion failure: !mIsMapped (Someone forgot to call Unmap())" with canvas getImageData(huge)
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla42
People
(Reporter: jruderman, Assigned: lsalzman)
References
Details
(Keywords: assertion, testcase)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
bas.schouten
:
review+
ritu
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Assertion failure: !mIsMapped (Someone forgot to call Unmap())
This assertion was added in https://hg.mozilla.org/mozilla-central/rev/856705b0c63f, not sure if the bug is a more recent regression.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
The testcase causes an OOM allocating the destination array inside CanvasRenderingContext2D::GetImageDataArray. However, the source is mapped before this occurs, and not unmapped when the OOM is returned.
To avoid this, this just moves the destination array allocation up before the map, so that if an OOM happens and returns, there is no mapped source lying around to be unmapped in the first place.
With this patch, the test case no longer crashes.
Attachment #8637957 -
Flags: review?(bas)
Updated•9 years ago
|
Attachment #8637957 -
Flags: review?(bas) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8637957 [details] [diff] [review]
check for OOM on destination array before mapping source to avoid needing unmap
Approval Request Comment
[Feature/regressing bug #]: https://hg.mozilla.org/mozilla-central/rev/536bd9910bc2
[User impact if declined]: JavaScript canvas2d code can be used to crash Firefox.
[Describe test coverage new/current, TreeHerder]: dom/canvas/test
[Risks and why]: Doesn't change code behavior, just causes OOM to be signaled earlier so as to avoid triggering assertion. Since the crash goes away once patched, we can assume the OOM is being handled properly now since no assertions are getting hit anymore.
[String/UUID change made/needed]: None
Attachment #8637957 -
Flags: approval-mozilla-aurora?
Comment 3•9 years ago
|
||
can we get a try run here, thanks!
Flags: needinfo?(lsalzman)
Keywords: checkin-needed
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #3)
> can we get a try run here, thanks!
https://treeherder.mozilla.org/#/jobs?repo=try&revision=35567d4763d6
Flags: needinfo?(lsalzman)
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 6•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
status-firefox41:
--- → affected
Comment on attachment 8637957 [details] [diff] [review]
check for OOM on destination array before mapping source to avoid needing unmap
Simple fix. Let's uplift to Aurora and hope it helps.
Attachment #8637957 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 8•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•