Closed
Bug 453564
Opened 16 years ago
Closed 16 years ago
TM: Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0])))
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: jruderman, Assigned: jorendorff)
References
Details
(Keywords: assertion, testcase, verified1.9.1, Whiteboard: fixed-in-tracemonkey)
Attachments
(2 files)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0]))), at /Users/jruderman/central/js/src/jsbuiltins.cpp:287
in js_String_p_match
I hit this once and was not able to reproduce. I have a stack trace, but I don't know how helpful it is.
I was using mozilla-central and had jit enabled for content.
Brendan is thinking of adding some extra printf stuff in the case where that assertion fails, so we'll at least know what type the thing is when the assertion fails.
Reporter | ||
Comment 1•16 years ago
|
||
I hit this again today, this time in String_p_match (not js_String_p_match).
Reporter | ||
Comment 2•16 years ago
|
||
Loading http://www.brf.com.sg/ifos2/index.jsp triggers this assertion failure.
Keywords: testcase-wanted
Reporter | ||
Comment 3•16 years ago
|
||
And so does loading http://www.likecool.com/.
Reporter | ||
Comment 4•16 years ago
|
||
Here's a js shell testcase, reduced from the URL in comment 2.
var a, z;
for (a = 0; a < 8; a++) {}
"x".toLowerCase();
for (z = 0; z < 4; z++) void (['0','0','0'][z].match(/0/) ? 1 : 2);
js -j b8.js
Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0]))), at jsstr.cpp:1448
Reporter | ||
Updated•16 years ago
|
Comment 5•16 years ago
|
||
The assert is a bit bogus. We should add a static assert on the jsval trickery and fix the assert.
Assignee: general → jorendorff
Comment 6•16 years ago
|
||
Note, i get a lot of crashes on the automated TopSite Testrun (see Bug 463377) today and this Assertion before the Crash.
Comment 7•16 years ago
|
||
Also a problem on Windows.
I was running into this fatal assertion on http://buxbb.com/index.php?showtopic=62736 during the Windows Topsite Run using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;rv:1.9.1b2pre) Gecko/20081111 Minefield/3.1b2pre
Flags: blocking1.9.1?
OS: Mac OS X → All
Hardware: PC → All
Comment 8•16 years ago
|
||
(In reply to comment #5)
> The assert is a bit bogus. We should add a static assert on the jsval trickery
> and fix the assert.
When I remove the assertion outright, I hit one of waldo's assertions trying to pop a totally bogus boolean in the interpreter. I don't have time to debug further, though.
I just hit this browsing cnn.com.
Summary: Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0]))) → TM: Assertion failure: JSVAL_IS_NULL(vp[0]) || (!JSVAL_IS_PRIMITIVE(vp[0]) && OBJ_IS_ARRAY(cx, JSVAL_TO_OBJECT(vp[0])))
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Comment 10•16 years ago
|
||
Jason, need help with this?
Assignee | ||
Comment 11•16 years ago
|
||
Sorry, didn't realize this was assigned to me.
It's a red herring that the loop will read past the end of the array; we actually assert before it gets there.
A few printfs produce:
str_match at pc=0x30d3a0 returning: jsval 14 (0xe) = true
str_match at pc=0x30d3a0 returning: jsval 14 (0xe) = true
String_p_match at pc=0x30d3a0 returning: jsval 14 (0xe) = true
Assertion failure: JSVAL_IS_BOOLEAN(v), at ../jsbool.cpp:180
What String_p_match is actually returning there is JSVAL_TO_OBJECT(JSVAL_TRUE), or 0x8. The JITted code depends on String_p_match returning a booloid; we got JSVAL_TRUE when recording, so the emitted guard tests for the exact value 1.
Instead it gets 8, so we bogusly side exit. Then when we restore the interpreter stack, the value we put at the top of the stack is BOOLEAN_TO_JSVAL(0x8), or 0x46. This bogus jsval triggers the later assert mentioned in comment 8.
Assignee | ||
Comment 12•16 years ago
|
||
Instead of returning 8 on success in this case, return a pointer to an arbitrary object.
I can't convince myself that this would be safe without the TempValueRooter. I am imagining a case where no one is on trace, and the branch callback is called from js_ExecuteRegExp.
Attachment #350083 -
Flags: review?(gal)
Comment 13•16 years ago
|
||
I am about to split regexp such that we collect results into an array and then trigger the lambda function from a follow-up loop. Would this eliminate the need for the rooter?
Updated•16 years ago
|
Attachment #350083 -
Flags: review?(gal) → review+
Reporter | ||
Comment 14•16 years ago
|
||
Bug 466351 and bug 468184 are about other web sites hitting this assertion.
This patch has review -- what's keeping it from landing?
Assignee | ||
Comment 16•16 years ago
|
||
Sorry, guys.
http://hg.mozilla.org/tracemonkey/rev/08c43641ab86
Andreas, re comment 13: Even without the branch callback, js_ExecuteRegExp can overwrite *rval and then allocate strings, which could trigger GC.
Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Whiteboard: fixed-in-tracemonkey
Comment 17•16 years ago
|
||
test included in js1_8_1/trace/trace-test.js
http://hg.mozilla.org/mozilla-central/rev/8f967a7729e2
Flags: in-testsuite+
Flags: in-litmus-
Comment 18•16 years ago
|
||
Keywords: fixed1.9.1
Comment 19•16 years ago
|
||
v 1.9.1, 1.9.2
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
Updated•15 years ago
|
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•