Closed
Bug 345879
Opened 19 years ago
Closed 19 years ago
Crash when calling a function from a generator with less arguments than its arity [@ js_GetSlotThreadSafe]
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1beta2
People
(Reporter: Seno.Aiko, Assigned: brendan)
References
Details
(Keywords: crash, testcase, verified1.8.1)
Crash Data
Attachments
(2 files)
|
339 bytes,
text/html
|
Details | |
|
5.07 KB,
patch
|
mrbkap
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Sample code:
function gen() {
yield isNaN()
}
f = gen()
f.next()
This crashes the shell immediately, the browser survives for a while (until it runs GC?). It works as fine if I replace isNaN() with isNaN(1).
The following variant gives an assertion:
function gen() {
(yield 5)()
yield
}
f = gen()
f.next()
f.send(Function())
Assertion failure: (uint32)2 < JS_MIN(((thisp)->map)->freeslot, ((thisp)->map)->
nslots), at jsinterp.c:530
Talkback ID TB21405588G
(Line 530 instead of 529 because I already tried the patch from bug 345772.)
Comment 2•19 years ago
|
||
Incident ID: 21405588
Stack Signature 0x80000001 2dbc9a4f
Product ID Firefox2
Build ID 2006072504
Trigger Time 2006-07-25 09:09:30.0
Platform Win32
Operating System Windows NT 5.2 build 3790
Module
URL visited
User Comments
Since Last Crash 54 sec
Total Uptime 545 sec
Trigger Reason Access violation
Source File, Line No. N/A
Stack Trace
0x80000001
js_GetSlotThreadSafe [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jslock.c, line 585]
js_ComputeThis [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 529]
js_Interpret [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 4021]
generator_send [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsiter.c, line 798]
js_Invoke [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 1349]
js_Interpret [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 4086]
js_Execute [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsinterp.c, line 1599]
JS_EvaluateUCScriptForPrincipals [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/js/src/jsapi.c, line 4322]
nsJSContext::EvaluateString [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/dom/src/base/nsJSEnvironment.cpp, line 1124]
nsScriptLoader::EvaluateScript [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsScriptLoader.cpp, line 775]
nsScriptLoader::ProcessRequest [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsScriptLoader.cpp, line 673]
nsScriptLoader::DoProcessScriptElement [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsScriptLoader.cpp, line 606]
nsScriptLoader::ProcessScriptElement [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsScriptLoader.cpp, line 358]
nsHTMLScriptElement::MaybeProcessScript [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/html/content/src/nsHTMLScriptElement.cpp, line 663]
nsHTMLScriptElement::BindToTree [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/html/content/src/nsHTMLScriptElement.cpp, line 456]
nsGenericElement::AppendChildTo [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/base/src/nsGenericElement.cpp, line 2860]
HTMLContentSink::ProcessSCRIPTTag [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/html/document/src/nsHTMLContentSink.cpp, line 4172]
HTMLContentSink::AddLeaf [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/content/html/document/src/nsHTMLContentSink.cpp, line 3038]
CNavDTD::AddLeaf [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/CNavDTD.cpp, line 3576]
CNavDTD::HandleDefaultStartToken [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/CNavDTD.cpp, line 1283]
CNavDTD::HandleStartToken [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/CNavDTD.cpp, line 1668]
CNavDTD::HandleToken [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/CNavDTD.cpp, line 955]
CNavDTD::BuildModel [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/CNavDTD.cpp, line 458]
nsParser::BuildModel [c:/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/parser/htmlparser/src/nsParser.cpp, line 2145]
Summary: Crash when calling a function from a generator with less arguments than its arity → Crash when calling a function from a generator with less arguments than its arity [@ js_GetSlotThreadSafe]
| Assignee | ||
Updated•19 years ago
|
Assignee: general → brendan
OS: Windows Server 2003 → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8.1beta2
| Assignee | ||
Comment 3•19 years ago
|
||
The two |gen| functions in the testcase demonstrate two different bugs, and should be separated.
/be
Attachment #230676 -
Flags: review?(mrbkap)
Updated•19 years ago
|
Attachment #230676 -
Flags: review?(mrbkap) → review+
Comment 4•19 years ago
|
||
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•19 years ago
|
Attachment #230676 -
Flags: approval1.8.1?
| Assignee | ||
Updated•19 years ago
|
Flags: blocking1.8.1?
Updated•19 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Comment 5•19 years ago
|
||
Comment on attachment 230676 [details] [diff] [review]
proposed fixes
a=drivers. Please land this on the MOZILLA_1_8_BRANCH.
Attachment #230676 -
Flags: approval1.8.1? → approval1.8.1+
Comment 7•19 years ago
|
||
Checking in regress-345879-01.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-345879-01.js,v <-- regress-345879-01.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_7/geniter/regress-345879-02.js,v
done
Checking in regress-345879-02.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-345879-02.js,v <-- regress-345879-02.js
initial revision: 1.1
Flags: in-testsuite+
Comment 8•19 years ago
|
||
Verified FIXED with testcase https://bugzilla.mozilla.org/attachment.cgi?id=230590 under SeaMonkey trunk build 2006-07-28-07 in Windows XP; no crash.
Status: RESOLVED → VERIFIED
Comment 9•19 years ago
|
||
verified fixed 1.8.1, 1.9 windows/mac(ppc|tel)/linux 20060728
Keywords: fixed1.8.1 → verified1.8.1
Updated•14 years ago
|
Crash Signature: [@ js_GetSlotThreadSafe]
You need to log in
before you can comment on or make changes to this bug.
Description
•