The default bug view has changed. See this FAQ.

"Assertion failure: script->code <= target && target < script->code + script->length," with trap

RESOLVED FIXED in mozilla8

Status

()

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

People

(Reporter: gkw, Assigned: luke)

Tracking

(Blocks: 1 bug, {assertion, regression, testcase})

Trunk
mozilla8
x86
Mac OS X
assertion, regression, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-tracemonkey][inbound])

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
function f() {
    print(
        Proxy.create((
            function() {
                return {
                    get: Namespace,
                }
            })
        ())
    )
}
dis(f)
trap(f, 0, '')
f()

asserts js debug shell on TM changeset f59568ec0513 with -d at Assertion failure: script->code <= target && target < script->code + script->length,

js> dis(f)
flags: NULL_CLOSURE
loc     op
-----   --
main:
00000:  callgname "print"     <-- trap goes here
00003:  getgname "Proxy"
00006:  callprop "create"
00009:  lambda (function () {return {get: Namespace};})
00012:  nullblockchain
00013:  push
00014:  call 0
00017:  call 1
00020:  call 1
00023:  pop
00024:  stop

Source notes:
 ofs  line    pc  delta desc     args
---- ---- ----- ------ -------- ------
  0:    1     0 [   0] newline 
  1:    2     3 [   3] newline 
  2:    3     6 [   3] pcbase   offset 3
  4:    3     9 [   3] newline 
  5:    4    14 [   5] pcbase   offset 5
  7:    4    17 [   3] pcbase   offset 14
  9:    4    20 [   3] pcbase   offset 20
 11:    4    24 [   4] setline  lineno 10

js> trap(f, 0, '')

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   70404:bb9e5496b0ac
user:        Luke Wagner
date:        Fri May 13 08:56:26 2011 -0700
summary:     Bug 656462, part 4 - Simplify stack code, keep track of native calls, create new iterator over native/scripted callstack, make JS_SaveFrameChain fallible (r=waldo,mrbkap)
(Reporter)

Comment 1

6 years ago
Created attachment 543654 [details]
stack

stack is hideously long...
(Reporter)

Comment 2

6 years ago
Still occurs on TM changeset d8e967b8afc8.
(Assignee)

Comment 3

6 years ago
Created attachment 544072 [details] [diff] [review]
fix

More DEBUG-only ridiculousness resulting from new strong assertions plus AutoScriptUntrapper.
Assignee: general → luke
Status: NEW → ASSIGNED
Attachment #544072 - Flags: review?(jwalden+bmo)
Comment on attachment 544072 [details] [diff] [review]
fix

Review of attachment 544072 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not sure this is the perfect, absolute most cleanest way to do this.  But it works, so meh.
Attachment #544072 - Flags: review?(jwalden+bmo) → review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/tracemonkey/rev/60b1a6a58531
Whiteboard: fixed-in-tracemonkey
This (along with most things committed on Friday afternoon) was backed out of mozilla-inbound in order to clear up orange.
(Assignee)

Comment 7

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/16b9dfded119
Whiteboard: fixed-in-tracemonkey → [fixed-in-tracemonkey][inbound]
http://hg.mozilla.org/mozilla-central/rev/16b9dfded119
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.