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)

All
Windows NT
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox38 --- fixed
firefox38.0.5 --- fixed
firefox39 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: milan)

References

Details

(Keywords: crash, Whiteboard: gfx-noted)

Crash Data

Attachments

(1 file, 1 obsolete file)

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.
Whiteboard: gfx-noted
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.
Attachment #8571483 - Attachment is obsolete: true
Attachment #8571483 - Flags: review?(matt.woodrow)
Attachment #8572014 - Flags: review?(matt.woodrow)
Assignee: nobody → milan
Attachment #8572014 - Flags: review?(matt.woodrow) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Milan, as you suggested in bug 1153558, an uplift would be nice. Thanks.
Flags: needinfo?(milan)
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 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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: