TM: Crash [@ js::DefaultValue] or "Assertion failure: v.isObject(),"

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
critical
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: gkw, Assigned: bhackett)

Tracking

(Blocks: 2 bugs, 4 keywords)

Trunk
x86
Mac OS X
assertion, crash, regression, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 535935 [details]
stack

Error.prototype.__proto__.p = 5;
f = Function("return( \"\" <arguments for(w in[]))");
for (i in f()) {}

crashes js opt shell on JM changeset 56eeb8e6d7c2 with -n at js::DefaultValue and asserts js debug shell at Assertion failure: v.isObject(),

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   70194:81997070017e
user:        Brian Hackett
date:        Thu May 26 12:28:19 2011 -0700
summary:     [INFER] Optimize arguments accesses, bug 658638.
(Reporter)

Comment 1

6 years ago
This was found using a combination of jsfunfuzz and jandem's method fuzzer.
(Assignee)

Comment 2

6 years ago
The script here contains JSOP_ARGUMENTS but it does not have the usesArguments flag set.  I think this is a bug in TM, but I'm not sure.  Should the script->usesArguments flag be synonymous with 'script contains JSOP_ARGUMENTS' ?  This was my reading of its comment.  CC'ing dvander.
(Assignee)

Updated

6 years ago
Duplicate of this bug: 660562
(Assignee)

Comment 4

6 years ago
Reminder note to double check the bug 660562 testcase when this gets resolved.
(Reporter)

Updated

6 years ago
Summary: TI: Crash [@ js::DefaultValue] or "Assertion failure: v.isObject()," → TM: Crash [@ js::DefaultValue] or "Assertion failure: v.isObject(),"
(Assignee)

Comment 5

6 years ago
Created attachment 537913 [details] [diff] [review]
patch

Fix.  We recorded the usesArguments on the function's TreeContext, and then made a new script to handle the array comprehension.  generatorExpr tried to propagate the deoptimization flags from the outer script into the comprehension script, but this was actually a no-op because it did this on the inner tc rather than the outer tc (here, tc == &gentc).

This is purely a TM issue, but I'd like to land this fix directly on JM and not TM, since this mainly affects JM and JM will be merging to TM very soon anyways.  It does need to get reviewed though, since this is outside the inference code and not under the purview of bug 657412.
Assignee: general → bhackett1024
Attachment #537913 - Flags: review?(dmandelin)
Comment on attachment 537913 [details] [diff] [review]
patch

Review of attachment 537913 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #537913 - Flags: review?(dmandelin) → review+
(Assignee)

Comment 7

6 years ago
http://hg.mozilla.org/projects/jaegermonkey/rev/cbf05c26053e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Crash Signature: [@ js::DefaultValue]
A testcase for this bug was automatically identified at js/src/jit-test/tests/basic/bug660538.js.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.