Closed Bug 404624 Opened 17 years ago Closed 17 years ago

ASSERTION: Invalid offset with ::first-letter and letter-spacing

Categories

(Core :: Layout, defect, P3)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: roc)

Details

(Keywords: assertion, testcase)

Attachments

(2 files, 1 obsolete file)

Attached file testcase
See testcase, I get this assertion in current debug trunk build:
###!!! ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file c:/m
ozilla-build/mozilla/gfx/thebes/src/gfxSkipChars.cpp, line 92
###!!! ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file c:/m
ozilla-build/mozilla/gfx/thebes/src/gfxSkipChars.cpp, line 92
This should get fixed, memory errors can develop
Assignee: nobody → roc
Flags: blocking1.9?
Priority: -- → P3
Flags: blocking1.9? → blocking1.9+
Attached patch fix (obsolete) — Splinter Review
The problem here is that we're passing too-long a length to PropertyProvider when we construct it. The textrun may not map all the content in the flow chain, represented by GetInFlowContentLength(), so we get these errors when we check IsInBounds. My solution here is to allow PR_INT32_MAX to be used as the content length to indicate we don't really know or care what it is. Most PropertyProvider methods don't actually need it except for bounds checking.
Attachment #290494 - Flags: review?(smontagu)
Whiteboard: [needs review]
Why don't we need to check for PR_INT32_MAX whenever we call  PropertyProvider.GetOriginalLength(), e.g. nsTextFrame::PaintTextSelectionDecorations and elsewhere?
Yeah, I should do that. Sorry, I'll post a new patch.
Attached patch fixSplinter Review
Updated patch with that. The callers of GetOriginalLength construct their own PropertyProvider so it's pretty easy to see that assert won't fire.
Attachment #290494 - Attachment is obsolete: true
Attachment #290647 - Flags: review?(smontagu)
Attachment #290494 - Flags: review?(smontagu)
Attachment #290647 - Flags: review?(smontagu) → review+
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs review]
I just backed this out because I think it may be causing a mochitest failure. (It had been backed out and relanded due to suspicious Tp.)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Tinderbox seems to show that the mochitest failure went away before I backed this out, so I relanded it.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
With my updated debug build, I don't see the assertion anymore, so verified fixed.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: