Closed Bug 333497 Opened 19 years ago Closed 19 years ago

HTMLContentSink::EndContext. SeaMonkey Trunk Browser crash if JavaScript is turned off

Categories

(Core :: DOM: HTML Parser, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bugzille, Assigned: mrbkap)

References

()

Details

(Keywords: crash, testcase, Whiteboard: [patch])

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060410 SeaMonkey/1.5a Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060410 SeaMonkey/1.5a If you visit http://tekade.de , SM-Trunk crashes, if JavaScript is turned off. The site checks, if JavaScript is anabled and sends a warningpage if its not anabled. At this moment SM crashes. Reproducible: Always Steps to Reproduce: 1.turn JS off 2.visit http://tekade.de 3.crash Actual Results: SM crashes Expected Results: SM should show the warningpage Talkback-ID is: TB17412065Z (thanks to toscha) Searching for the last good build was tricky. 2005090804 was the last build that show the warningpage on my system. 2005090904 show an empty page but do not crash. 2005102104 always do so. 2005102112 crashes. This is a very small window and gives a good chance to find the responsible check in!
Keywords: crash
Version: unspecified → Trunk
Assignee: general → mrbkap
Status: UNCONFIRMED → NEW
Component: General → HTML: Parser
Ever confirmed: true
Keywords: testcase
Product: Mozilla Application Suite → Core
QA Contact: general → parser
Attached file testcase
This crashes for me when javascript is turned off.
(In reply to comment #1) > Created an attachment (id=217942) [edit] > testcase > > This crashes for me when javascript is turned off. ACK.
Status: NEW → ASSIGNED
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Whiteboard: [patch]
Attached patch Proposed fix, v1 (obsolete) — Splinter Review
This patch contains two fixes: -- Note the return value from BeginContext. nsIHTMLContentSink::BeginContext returns failure when we pass it a bad index, and soldiering on after doing so will result in guaranteed crashes. -- Always push a stack entry on the DTD context for opened heads. Not doing so is the root cause of this bug because when we try to pass an index from the DTD into the sink, the two stacks *must* match. With this patch, we don't quite build the expected DOM for reasons I'm not sure of, but I'm not sure if anybody cares. It might be worth filing a new bug on that.
Attachment #217961 - Flags: superreview?(jst)
Attachment #217961 - Flags: review?(bugmail)
Attached patch Proposed fix, v2Splinter Review
This fixes the content model weirdness by making the head behave more like a normal tag. It also makes sure that if we're going to try to stick a tag in the body, that we actually have a body.
Attachment #217961 - Attachment is obsolete: true
Attachment #217976 - Flags: superreview?(jst)
Attachment #217976 - Flags: review?(bugmail)
Attachment #217961 - Flags: superreview?(jst)
Attachment #217961 - Flags: review?(bugmail)
Comment on attachment 217976 [details] [diff] [review] Proposed fix, v2 Admittedly, I don't really understand all that's going on in this patch.
Attachment #217976 - Flags: review?(bugmail) → review+
Comment on attachment 217976 [details] [diff] [review] Proposed fix, v2 sr=jst
Attachment #217976 - Flags: superreview?(jst) → superreview+
Blake, the patch has r+ and sr+, so it can be checked in. Not sure whether you're waiting on something or simply forgot about this one.
I'm hoping to find some time to re-review it myself to make sure I really understand how it works and what's going on.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
(In reply to comment #9) > Fix checked in. Thank you. I cant check out, if this patch eleminate my crash, cause now I found out, that the site http://tekade.de *works* since my SM-Trunk-build 2006060804. Last bad here was 2006060700. Something must be done in between... Anyway. Thanks for your work.
Depends on: 342520
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: