Closed
Bug 349023
Opened 20 years ago
Closed 20 years ago
Bogus JSCLASS_IS_EXTENDED in the generator class
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.8.1beta2
People
(Reporter: JasnaPaka, Assigned: igor)
References
()
Details
(Keywords: crash, verified1.8.1)
Attachments
(3 files)
|
4.09 KB,
text/plain
|
Details | |
|
135 bytes,
text/html
|
Details | |
|
866 bytes,
patch
|
brendan
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060817 BonEcho/2.0b1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060817 BonEcho/2.0b1
1. Visit URL (see above).
2. Firefox crashes.
TB22194801G
Reproducible: Always
Same problem with latest Firefox Trunk.
| Reporter | ||
Comment 1•20 years ago
|
||
Source:
<script type="text/javascript" language="JavaScript">
function test() {
var i = 0;
yield i;
}
var g = test();
for (var i = 0; i < 10; i++) {
document.write(g.next() + "<BR>\n");
}
</script>
Flags: blocking1.8.1?
Keywords: crash
Comment 2•20 years ago
|
||
Incident ID: 22194801
Stack Signature iterator_self 2930a74a
Product ID Firefox2
Build ID 2006081703
Trigger Time 2006-08-17 09:21:46.0
Platform Win32
Operating System Windows NT 5.1 build 2600
Module js3250.dll + (0002aaeb)
URL visited
User Comments
Since Last Crash 11738 sec
Total Uptime 11738 sec
Trigger Reason Access violation
Source File, Line No. .../mozilla/js/src/jsiter.c, line 278
Stack Trace
iterator_self [.../mozilla/js/src/jsiter.c, line 278]
nsXPConnect::GetWrappedNativeOfJSObject [.../mozilla/js/src/xpconnect/src/nsXPConnect.cpp, line 677]
nsWindowSH::GetProperty [.../mozilla/dom/src/base/nsDOMClassInfo.cpp, line 4194]
XPC_WN_Helper_GetProperty [.../mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 947]
js_Interpret [.../mozilla/js/src/jsinterp.c, line 4178]
js_Execute [.../mozilla/js/src/jsinterp.c, line 1600]
JS_EvaluateUCScriptForPrincipals [.../mozilla/js/src/jsapi.c, line 4365]
nsJSContext::EvaluateString [.../mozilla/dom/src/base/nsJSEnvironment.cpp, line 1098]
nsScriptLoader::EvaluateScript [.../mozilla/content/base/src/nsScriptLoader.cpp, line 775]
nsScriptLoader::ProcessRequest [.../mozilla/content/base/src/nsScriptLoader.cpp, line 673]
nsScriptLoader::DoProcessScriptElement [.../mozilla/content/base/src/nsScriptLoader.cpp, line 606]
nsScriptLoader::ProcessScriptElement [.../mozilla/content/base/src/nsScriptLoader.cpp, line 358]
nsHTMLScriptElement::MaybeProcessScript [.../mozilla/content/html/content/src/nsHTMLScriptElement.cpp, line 663]
nsHTMLScriptElement::BindToTree [.../mozilla/content/html/content/src/nsHTMLScriptElement.cpp, line 456]
nsGenericElement::AppendChildTo [.../mozilla/content/base/src/nsGenericElement.cpp, line 2868]
HTMLContentSink::ProcessSCRIPTTag [.../mozilla/content/html/document/src/nsHTMLContentSink.cpp, line 4174]
HTMLContentSink::AddLeaf [.../mozilla/content/html/document/src/nsHTMLContentSink.cpp, line 3040]
HTMLContentSink::AddHeadContent [.../mozilla/content/html/document/src/nsHTMLContentSink.cpp, line 2991]
CNavDTD::AddHeadLeaf [.../mozilla/parser/htmlparser/src/CNavDTD.cpp, line 3613]
CNavDTD::HandleToken [.../mozilla/parser/htmlparser/src/CNavDTD.cpp, line 955]
CNavDTD::BuildModel [.../mozilla/parser/htmlparser/src/CNavDTD.cpp, line 458]
nsParser::BuildModel [.../mozilla/parser/htmlparser/src/nsParser.cpp, line 2145]
Severity: normal → critical
Comment 3•20 years ago
|
||
The stack makes no sense:
iterator_self [.../mozilla/js/src/jsiter.c, line 278]
nsXPConnect::GetWrappedNativeOfJSObject
There's no direct or indirect call that can connect those two frames. Even if intervening frames were optimized away.
Anyway, the test URL works for me on trunk now, and the 1.8 branch files to-do with iterators and generators are in sync. If someone can find the bug that fixed this, mark it a dup. I'm marking WFM.
/be
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Whiteboard: DUPEME
Comment 5•20 years ago
|
||
(In reply to comment #3)
> The stack makes no sense:
>
> iterator_self [.../mozilla/js/src/jsiter.c, line 278]
> nsXPConnect::GetWrappedNativeOfJSObject
The calling line in nsXPConnect::GetWrappedNativeOfJSObject is NS_ADDREF(wrapper), a virtual call, so if wrapper is a deleted object, then this does make sense. I think that this might be worth keeping open to investigate how nsXPConnect::GetWrappedNativeOfJSObject can return a dead wrapper.
Status: RESOLVED → UNCONFIRMED
Component: JavaScript Engine → XPConnect
Resolution: WORKSFORME → ---
Comment 6•20 years ago
|
||
I actually crash in JS_GetClass using trunk SeaMonkey 2006-08-17-08; oddly enough, I don't crash in today's trunk Minefield build, it just displays a "0."
| Reporter | ||
Comment 7•20 years ago
|
||
With today FF Branch: TB22233844M
Comment 8•20 years ago
|
||
*** Bug 349281 has been marked as a duplicate of this bug. ***
Comment 9•20 years ago
|
||
Comment 10•20 years ago
|
||
Stack trace with a few-days-old build: http://pastebin.mozilla.org/82
Stack trace with a few-minutes-old build: http://pastebin.mozilla.org/83
| Assignee | ||
Comment 11•20 years ago
|
||
Here is a trivial example for JS shell that crashes immediately:
gen = (function() { yield 3; })();
var x = (gen ==gen);
When changing generators back to use JSClass in bug 346450 I forgot to remove JSCLASS_IS_EXTENDED :(
Assignee: dbradley → igor.bukanov
Status: UNCONFIRMED → NEW
Component: XPConnect → JavaScript Engine
Ever confirmed: true
Updated•20 years ago
|
QA Contact: xpconnect → general
| Assignee | ||
Comment 12•20 years ago
|
||
Attachment #234560 -
Flags: review?(brendan)
Attachment #234560 -
Flags: approval1.8.1?
Comment 14•20 years ago
|
||
Comment on attachment 234560 [details] [diff] [review]
Fix
How'd I miss that? Sigh.
/be
Attachment #234560 -
Flags: review?(brendan) → review+
| Assignee | ||
Comment 15•20 years ago
|
||
I committed the patch from comment 12.
Status: NEW → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Summary: Firefox crashes if I use Js 1.7 iterator [@ iterator_self] → Bogus JSCLASS_IS_EXTENDED in the generator class
Comment 16•20 years ago
|
||
*** Bug 349346 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Target Milestone: --- → mozilla1.8.1beta2
Comment 17•20 years ago
|
||
Comment on attachment 234560 [details] [diff] [review]
Fix
a=beltzner on behalf of drivers, mrbkap to land through the haze of some jager ...
Attachment #234560 -
Flags: approval1.8.1? → approval1.8.1+
Comment 19•20 years ago
|
||
RCS file: /cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-01.js,v
done
Checking in regress-349023-01.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-01.js,v <-- regress-349023-01.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-02.js,v
done
Checking in regress-349023-02.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-02.js,v <-- regress-349023-02.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-03.js,v
done
Checking in regress-349023-03.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-349023-03.js,v <-- regress-349023-03.js
initial revision: 1.1
done
Flags: in-testsuite+
Comment 20•20 years ago
|
||
verified fixed 1.8, 1.9 20060821 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•