Closed
Bug 467487
Opened 16 years ago
Closed 16 years ago
"ASSERTION: Bad justifiable character count" with pre-line
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: jruderman, Assigned: roc)
References
Details
(Keywords: assertion, fixed1.9.1, testcase)
Attachments
(2 files, 1 obsolete file)
254 bytes,
text/html
|
Details | |
3.71 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
This testcase triggers a number of assertions:
###!!! ASSERTION: Attempting to allocate excessively large array: 'Error', file nsTArray.cpp, line 69
###!!! ASSERTION: Bad justifiable character count: 'numJustifiableCharacters <= charsFit', file layout/generic/nsTextFrameThebes.cpp, line 6047
###!!! ASSERTION: Bad offset looking for glyphrun: 'aOffset <= mCharacterCount', file gfx/thebes/src/gfxFont.cpp, line 2154
###!!! ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file gfx/thebes/src/gfxSkipChars.cpp, line 92
###!!! ASSERTION: Negative flow length?: 'flowEndInTextRun >= transformedOffset', file layout/generic/nsTextFrameThebes.cpp, line 5827
###!!! ASSERTION: No characters in run (initial length too large?): 'mRunLength > 0', file layout/generic/nsTextFrameUtils.cpp, line 229
###!!! ASSERTION: Range out of bounds: 'IsInBounds(mStart, mLength, aStart, aLength)', file layout/generic/nsTextFrameThebes.cpp, line 2304
###!!! ASSERTION: Text run does not map enough text for our reflow: 'gfxSkipCharsIterator(iter).ConvertOriginalToSkipped(offset + length) <= mTextRun->GetLength()', file layout/generic/nsTextFrameThebes.cpp, line 5784
Security-sensitive because a few of these assertions make me worry there might be integer overflows going on.
Reporter | ||
Comment 1•16 years ago
|
||
Nominating for blocking: pre-line (new feature) + common stuff = bad asserts.
Flags: blocking1.9.1?
Assignee | ||
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P3
Assignee | ||
Comment 2•16 years ago
|
||
What happens here is, in the first reflow we split the line into three text frames, "AB ", "DEF\n" and " ". Frames #1 and #2 share one text run for "AB DEF\n", frame #3 gets another text run for " ". Then we reflow again with increased width. Frame #1 gets the text "AB DEF\n" now. Frame #2 gets the following " ", but its mTextRun is still set to the "AB DEF\n" textrun. We haven't cleared it/adjusted it when the offsets changed we should have.
Assignee | ||
Comment 3•16 years ago
|
||
I need to figure out why pre-wrap doesn't have this problem. But the solution is probably going to involve modifying nsTextFrame::SetLength.
Assignee | ||
Comment 4•16 years ago
|
||
Just need to tweak the test that detects when the textrun currently assigned to the frame is too short. We need to drop the condition that length > 0; in this testcase, length is 0, but we've advanced 'offset'.
Attachment #353015 -
Flags: review?(smontagu)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [needs review]
Comment 5•16 years ago
|
||
Comment on attachment 353015 [details] [diff] [review]
fix
makes sense
Attachment #353015 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 6•16 years ago
|
||
Actually I've got a better idea. We can directly ask the textrun how much DOM text it maps.
Assignee: nobody → roc
Attachment #353015 -
Attachment is obsolete: true
Attachment #353093 -
Flags: review?(smontagu)
Updated•16 years ago
|
Attachment #353093 -
Flags: review?(smontagu) → review+
Assignee | ||
Updated•16 years ago
|
Whiteboard: [needs review] → [needs landing]
Assignee | ||
Comment 7•16 years ago
|
||
Pushed 62c3545aabad to trunk.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Updated•12 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•