Closed
Bug 226078
Opened 22 years ago
Closed 22 years ago
Crash on www.gddkia.gov.pl
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.6beta
People
(Reporter: thetester, Assigned: brendan)
References
()
Details
(Keywords: crash, js1.5, Whiteboard: TB25753006K)
Attachments
(2 files)
6.64 KB,
text/plain
|
Details | |
2.96 KB,
patch
|
shaver
:
review+
|
Details | Diff | Splinter Review |
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.
Comment 1•22 years ago
|
||
WFM, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030
Keywords: crash
Updated•22 years ago
|
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
Original URL was actually http://www.gddkia.gov.pl/zima_html/utr_tab.htm, I
apologize for the bug spam.
Comment 4•22 years ago
|
||
DrWatson shows it possibly crashes in js_Invoke (probably not useful) for FB
20031116 Win2k.
![]() |
||
Comment 5•22 years ago
|
||
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
Comment 6•22 years ago
|
||
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
![]() |
||
Comment 7•22 years ago
|
||
Uh-huh.
Component: Browser-General → JavaScript Engine
Keywords: stackwanted
OS: Windows XP → All
Hardware: PC → All
Comment 8•22 years ago
|
||
TB25753594Y
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6a) Gecko/20031028
Comment 9•22 years ago
|
||
Comment 10•22 years ago
|
||
Is this a JS Engine bug, or a bad call from DOM Events code?
Comment 11•22 years ago
|
||
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.
![]() |
||
Comment 12•22 years ago
|
||
Any JS that crashes the JS engine would be a bug in the JS engine code...
Assignee | ||
Comment 13•22 years ago
|
||
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 | ||
Comment 14•22 years ago
|
||
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
![]() |
||
Comment 15•22 years ago
|
||
> 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...
Assignee | ||
Comment 16•22 years ago
|
||
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
Assignee | ||
Comment 17•22 years ago
|
||
Can someone evangelize that site to get rid of the bogus =0?
/be
Assignee | ||
Comment 18•22 years ago
|
||
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
Assignee | ||
Updated•22 years ago
|
Attachment #135858 -
Flags: review?(shaver)
Comment 19•22 years ago
|
||
Comment on attachment 135858 [details] [diff] [review]
proposed fix
Sure -- run the testsuite?
Attachment #135858 -
Flags: review?(shaver) → review+
Comment 20•22 years ago
|
||
requesting blocking 1.4.2 as 1.4.1 was also crashing.
Flags: blocking1.4.2?
Assignee | ||
Comment 21•22 years ago
|
||
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
Comment 23•20 years ago
|
||
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+
You need to log in
before you can comment on or make changes to this bug.
Description
•