Closed Bug 226078 Opened 22 years ago Closed 22 years ago

Crash on www.gddkia.gov.pl

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.6beta

People

(Reporter: thetester, Assigned: brendan)

References

()

Details

(Keywords: crash, js1.5, Whiteboard: TB25753006K)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030 This page crashes browser! Reproducible: Always Steps to Reproduce: 1. 2. 3.
WFM, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030
Keywords: crash
Summary: Browser crashes! → Crash on www.gddkia.gov.pl
Confirmed, this crashes for me in the 20031117 Firebird nightly and Mozilla 1.5 on Win2000. Note that the steps to reproduce are not 100% right it seems...when that site finishes loading, it redirects to a page with a single link. Clicking on that link will then load a page which crashes Mozilla. The URL that crashes every time for me is http://www.gddkia.gov.pl/zima_html/info.htm. I don't have a talkback ID since recent builds do not have talkback it seems. Changed URL, original was http://www.gddkia.gov.pl/zima_html/info.htm
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: stackwanted
Original URL was actually http://www.gddkia.gov.pl/zima_html/utr_tab.htm, I apologize for the bug spam.
DrWatson shows it possibly crashes in js_Invoke (probably not useful) for FB 20031116 Win2k.
JavaScript strict warning: http://www.gddkia.gov.pl/zima_html/utils.js line 263: deprecated with statement usage Assertion failure: JSVAL_IS_OBJECT(rval), at /home/bzbarsky/mozilla/xlib/mozilla/js/src/jsinterp.c:1577 Program received signal SIGABRT, Aborted. Over to JS engine.
Assignee: general → general
Component: Browser-General → JavaScript Engine
OS: Windows XP → All
QA Contact: general → PhilSchwartau
Hardware: PC → All
TB25753006K Talkback produced by Mozilla 1.5 on Win98SE also crashing: 1.4.1, 1.6a, latest trunk, Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6b) Gecko/20031117
Component: JavaScript Engine → Browser-General
OS: All → Windows XP
Hardware: All → PC
Whiteboard: TB25753006K
Uh-huh.
Component: Browser-General → JavaScript Engine
Keywords: stackwanted
OS: Windows XP → All
Hardware: PC → All
TB25753594Y Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6a) Gecko/20031028
Attached file Hermann's stack traces
Is this a JS Engine bug, or a bad call from DOM Events code?
Confirming Linux Mozilla/Firebird recent trunk crash is caused by function function SetLangHead(l){ with(p.head.document){ for(var i=0 in TytH[l]) if(getElementById("TxtH"+i)!=undefined) getElementById("TxtH"+i).innerHTML=TytH[l][i] if(getElementById("TxtHM")) getElementById("TxtHM").innerHTML=tyts[l][p.PageIdx] } } from utils.js. Gecko crashes on "if(getElementById("TxtH"+i)!=undefined)" part.
Any JS that crashes the JS engine would be a bug in the JS engine code...
Re: comment 12: we've had bugs where a bad (dangling) JSContext* was passed into the JS engine, reproducibly, due to content tickling a bug in dialog code. JS crashes the JS engine != JS engine bug. However, in this case, the testcase does demonstrate a big bad JS engine bug! ;-) Taking for 1.6b. /be
Assignee: general → brendan
Keywords: js1.5
Priority: -- → P1
Target Milestone: --- → mozilla1.6beta
Here's a non-reduced JS shell testcase: function SetLangHead(l){ with(p.head.document){ for(var i in TytH[l]) if(getElementById("TxtH"+i)!=undefined) getElementById("TxtH"+i).innerHTML=TytH[l][i] if(getElementById("TxtHM")) getElementById("TxtHM").innerHTML=tyts[l][p.PageIdx] } } TytH=[0,1,2,3]; p={head:{document:{getElementById: function (id){print(uneval(this), id); return undefined;}}}}; SetLangHead(1); If you remove the bogus initializer for var i, so the for/in loop begins "for (var i in ...)...", then all is well. /be
Status: NEW → ASSIGNED
> If you remove the bogus initializer for var i I assume that was supposed to be |for (var i = 0 in .. .)| in the code you pasted? Point taken about bad JSContexts, but I guess I don't think of that case as "JS crashes JS engine" but "DOM glue crashes JS engine"... I suppose that's not a useful distinction without staring at the code...
Duh, yeah: here is a reduced JS shell testcase. The salient badness is the =0 bit after 'for(var i' and before ' in x)': function SetLangHead(l){ with(p){ for(var i=0 in x) if(getElementById("TxtH"+i)!=undefined) print('huh'); } } x=[0,1,2,3]; p={getElementById: function (id){print(uneval(this), id); return undefined;}}; SetLangHead(1); Fun, eh? Old bug, fix coming in a few minutes, assuming no Comdex mozilla booth traffic uptick. /be
Can someone evangelize that site to get rid of the bogus =0? /be
Attached patch proposed fixSplinter Review
I took this opportunity to expand ancient tab evil in jsopcode.c. The jsopcode.c fix helps us decompile for (var i in o) properly, for both the heavyweight (wrapped in with) and lightweight function cases (i is a local var in both cases, but we must look it up by name in the with-wrapped heavyweight case). The jsparse.c change is the main fix. Ancient bug! /be
Attachment #135858 - Flags: review?(shaver)
Comment on attachment 135858 [details] [diff] [review] proposed fix Sure -- run the testsuite?
Attachment #135858 - Flags: review?(shaver) → review+
requesting blocking 1.4.2 as 1.4.1 was also crashing.
Flags: blocking1.4.2?
Fixed (testsuite passed, but it needs some additions to cover all the lightweight vs. heavyweight vs. for (var i in o) vs. for (var i = 0 in o) cases). mkaply is driving 1.4.2 -- I'll let him approve the bug, then develop a branch patch. /be
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
I'd like this for 1.4.2
Flags: blocking1.4.2? → blocking1.4.2+
Checking in regress-226078.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-226078.js,v <-- regress-226078.js initial revision: 1.1 done
Flags: testcase+
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: