TI: Assertion failure: !fe->isType(JSVAL_TYPE_DOUBLE), at ./methodjit/FrameState-inl.h:793

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
critical
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: decoder, Assigned: jandem)

Tracking

(Blocks: 2 bugs, {assertion, testcase})

Trunk
x86_64
Linux
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-jaegermonkey)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
The following test case (run with -n -a -m) asserts on TI tip (tested on 64
bit):

test();
function test()
{
  for (var i = 0; i < 2; ++i) {
    for (var e = 0; "FUN1 = new Function( 'a','b','c', 'return FUN1.length' ); FUN1.length"; ++e) {
    }
  }  
}
(Assignee)

Comment 1

7 years ago
Created attachment 519757 [details] [diff] [review]
Patch

Looks like we should not call syncData for known doubles and known doubles are synced later on. This fixes the assert and passes jit-tests and jstests. Please review carefully, I don't trust my understanding of FrameState.cpp at all.
Assignee: general → jandemooij
Status: NEW → ASSIGNED
Attachment #519757 - Flags: review?(bhackett1024)
I think that in the case where fe->isType(JSVAL_TYPE_DOUBLE), you want to call syncFe (which can be done for doubles without eviction) to sync the whole entry at the branch target.  After the second pass, all registers required to be synced at the target should have been synced.
(Assignee)

Comment 3

7 years ago
Created attachment 519781 [details] [diff] [review]
Patch v2

As discussed on IRC, we can call syncFe instead of syncData. This fixes the test and passes jit-tests and jstests with -m -n -a. I won't have much time to work on this tomorrow so feel free to steal.
Attachment #519757 - Attachment is obsolete: true
Attachment #519757 - Flags: review?(bhackett1024)
Attachment #519781 - Flags: review?(bhackett1024)
Attachment #519781 - Flags: review?(bhackett1024) → review+
http://hg.mozilla.org/projects/jaegermonkey/rev/deb49a09d553
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-jaegermonkey
(Reporter)

Updated

7 years ago
Blocks: 676763
(Reporter)

Comment 5

5 years ago
A testcase for this bug was automatically identified at js/src/jit-test/tests/jaeger/bug642198.js.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.