Memory corruption with <tr style="display: inherit">

VERIFIED FIXED

Status

()

Core
Layout: Tables
--
critical
VERIFIED FIXED
11 years ago
10 years ago

People

(Reporter: Jesse Ruderman, Assigned: bz)

Tracking

(Blocks: 1 bug, 5 keywords)

Trunk
x86
Mac OS X
arch, crash, testcase, verified1.8.0.12, verified1.8.1.4
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.8.1.4 +
wanted1.8.1.x +
blocking1.8.0.12 +
wanted1.8.0.x +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sg:critical] see https://bugzilla.mozilla.org/show_bug.cgi?id=323656#c5)

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
Created attachment 257012 [details]
testcase (causes memory corruption / crashes)

This testcase leads to crashes in *entirely* random places and times.  It might crash soon during GC, or it might crash while writing bookmarks during shutdown, or it might not crash at all.  You should restart Firefox after loading the testcase to avoid data loss in a crash later.

Memory corruption leading to random crashes, including "Illegal instruction" crashes --> sg:critical.

You're also likely to see these two assertions:

###!!! ASSERTION: wrong display type on rowframe: 'NS_STYLE_DISPLAY_TABLE_ROW == childFrame->GetStyleDisplay()->mDisplay', file /Users/jruderman/trunk/mozilla/layout/tables/nsTableRowFrame.cpp, line 1291

###!!! ASSERTION: invalid array index: 'i < Length()', file ../../dist/include/xpcom/nsTArray.h, line 318

and you might also see:

###!!! ASSERTION: span beyond the row size!: 'endColIndex + 1 <= row.Length()', file /Users/jruderman/trunk/mozilla/layout/tables/nsCellMap.cpp, line 2108

###!!! ASSERTION: Bogus row index?: 'Not Reached', file /Users/jruderman/trunk/mozilla/layout/tables/nsCellMap.cpp, line 399
Flags: blocking1.9?
(Reporter)

Comment 1

11 years ago
Does the tr's display property have to be "inherit" to trigger this crash?  The computed style is "block" (why not "table"?), but if I change "inherit" to "block" in the testcase the assertions and crash and incorrect display go away.
Whiteboard: [sg:critical]
I think this might be related to bug 317876.
Created attachment 257038 [details]
valgrind warnings

Comment 4

11 years ago
###!!! ASSERTION: wrong display type on rowframe: 'NS_STYLE_DISPLAY_TABLE_ROW
== childFrame->GetStyleDisplay()->mDisplay', file
/Users/jruderman/trunk/mozilla/layout/tables/nsTableRowFrame.cpp, line 1291

Is exactly bug 317876, the cure is outlined in https://bugzilla.mozilla.org/show_bug.cgi?id=323656#c5 which is beyond my capabilities.
Depends on: 317876

Updated

10 years ago
Keywords: arch
Whiteboard: [sg:critical] → [sg:critical] see https://bugzilla.mozilla.org/show_bug.cgi?id=323656#c5

Comment 5

10 years ago
Critical security bugs need to have an owner.  Bern, DBarron, who should own this bug?
Whoever owns bug 323656.

Comment 7

10 years ago
That one is also assigned to nobody.  Any ideas who should get them?
(Reporter)

Comment 8

10 years ago
bz attached a patch last week and it already has review.  It sounds like he needs more time to test the patch before he's comfortable checking it in.
Assignee: nobody → bzbarsky
Note to self:  The PresContext() landing bitrotted this.  Need to update...  The patch lives in the "leafframe" tree.
Depends on: 323656
Now that bug bug 323656 is fixed, is this still a problem?
(Reporter)

Comment 11

10 years ago
A debug build from earlier today had a bunch of problems (random rendering, assertions, random crashes) with the testcase.  A debug build from just now does fine.  FIXED by the checkin for bug 323656.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Flags: blocking1.9?
Resolution: --- → FIXED
The testcase crashes debug 1.5.0.12pre/2.0.0.4pre builds but with a different assertion (twice):

###!!! ASSERTION: Computed overflow area must contain frame bounds: 'aNewSize.width == 0 || aNewSize.height == 0 || aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize))', file c:/dev/ff2/mozilla/layout/generic/nsFrame.cpp, line 4410

The crash is due to the debug heap routines detecting damaged blocks (i.e. most likely sg:critical). Applying the patch from bug 323656 to see if it's the same thing as the trunk crash.
Flags: wanted1.8.1.x+
Flags: wanted1.8.0.x+
Flags: blocking1.8.1.4?
Flags: blocking1.8.0.12?
The patch from bug 323656 seems to fix the branch crash, too.
Flags: blocking1.8.1.4?
Flags: blocking1.8.1.4+
Flags: blocking1.8.0.12?
Flags: blocking1.8.0.12+
Appears fixed in 1.8.1.4pre by bug 323656. Adding keywords but also "qawanted" to make sure we double-check this one.
Keywords: fixed1.8.0.12, fixed1.8.1.4, qawanted
Verified fixed on trunk and branches.
The testcase doesn't crash on load, or even reloading it a few times.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.0.12, fixed1.8.1.4, qawanted → verified1.8.0.12, verified1.8.1.4
Group: security
Flags: in-testsuite?
(Reporter)

Comment 16

10 years ago
Crashtest checked in.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.