Closed
Bug 1133119
Opened 10 years ago
Closed 10 years ago
crash in memmove | mozilla::gfx::CopyToImageSurface(unsigned char*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, int, mozilla::gfx::SurfaceFormat)
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: MatsPalmgren_bugz, Assigned: milan)
References
Details
(Keywords: crash, Whiteboard: gfx-noted)
Crash Data
Attachments
(1 file, 1 obsolete file)
6.54 KB,
patch
|
mattwoodrow
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-release+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is
report bp-d84f9347-eeb0-46b9-9fb2-789012150212.
=============================================================
Looks like this signature has a spike in recent versions:
Product Version Percentage Number Of Crashes
Firefox 38.0a1 98.09 % 154
Firefox 37.0a1 1.27 % 2
Thunderbird 38.0a1 0.64 % 1
All crashes are EXCEPTION_ACCESS_VIOLATION_READ on address 0x0,
so it looks like 'source' is null here (which means 'aData' was null):
http://hg.mozilla.org/mozilla-central/annotate/3094601af679/gfx/2d/DrawTargetCairo.cpp#l234
So it looks like it's the same problem as in bug 1035168?
(BTW, this method could use MOZ_ASSERT(aData) and aRect.x/y >= 0 at the top.
And MOZ_ASSERT(surfData) after line 224, if we believe it should never
return NULL there.)
All crashes with this signature are on 64-bit Windows, fwiw.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8571483 -
Flags: review?(matt.woodrow)
Comment 2•10 years ago
|
||
Comment on attachment 8571483 [details] [diff] [review]
More null checks, and have Map fail if the data is null. r=mattwoodrow
Review of attachment 8571483 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/2D.h
@@ +408,5 @@
> * Can return 0 if there was OOM allocating surface data.
> */
> virtual int32_t Stride() = 0;
>
> + /**
Trailing whitespace.
@@ +416,5 @@
> {
> aMappedSurface->mData = GetData();
> aMappedSurface->mStride = Stride();
> mIsMapped = true;
> + return !!aMappedSurface->mData;
We shouldn't set mIsMapped=true if this is going to return false.
::: gfx/2d/SourceSurfaceD2D.cpp
@@ +280,5 @@
> aMappedSurface->mData = (uint8_t*)map.pData;
> aMappedSurface->mStride = map.RowPitch;
> mIsMapped = true;
>
> + return !!aMappedSurface->mData;
Same with mIsMapped here, and the other two.
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8571483 -
Attachment is obsolete: true
Attachment #8571483 -
Flags: review?(matt.woodrow)
Attachment #8572014 -
Flags: review?(matt.woodrow)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → milan
Updated•10 years ago
|
Attachment #8572014 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Comment 7•10 years ago
|
||
Milan, as you suggested in bug 1153558, an uplift would be nice. Thanks.
status-firefox38:
--- → affected
Flags: needinfo?(milan)
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8572014 [details] [diff] [review]
More null checks, and have Map fail if the data is null. r=mattwoodrow
Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: 85% of memcpy crashes come from this signature (see bug 1153558, comment 9)
[Describe test coverage new/current, TreeHerder]:
[Risks and why]:
[String/UUID change made/needed]:
Flags: needinfo?(milan)
Attachment #8572014 -
Flags: approval-mozilla-beta?
Attachment #8572014 -
Flags: approval-mozilla-aurora?
Comment 9•10 years ago
|
||
Comment on attachment 8572014 [details] [diff] [review]
More null checks, and have Map fail if the data is null. r=mattwoodrow
[Triage Comment]
we merged m-b in m-r.
Taking it as it landed a month ago and, hopefully, will fix many crashes.
Attachment #8572014 -
Flags: approval-mozilla-release+
Attachment #8572014 -
Flags: approval-mozilla-beta?
Attachment #8572014 -
Flags: approval-mozilla-aurora?
Attachment #8572014 -
Flags: approval-mozilla-aurora+
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Updated•10 years ago
|
status-firefox38.0.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•