Closed Bug 658950 Opened 9 years ago Closed 9 years ago

TI: "Assertion failure: JSOp(*yieldpc) == JSOP_YIELD," with trap

Categories

(Core :: JavaScript Engine, defect, critical)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: gkw, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

Attached file stack
f = (function() {
  let x;
  yield
})
trap(f, 6, undefined);
for (a in f())
  (function() {})()

asserts js debug shell on JM changeset d37ec0c318d6 with -d at Assertion failure: JSOp(*yieldpc) == JSOP_YIELD,
Tested with a 32-bit shell in 64-bit Ubuntu 11.04.
js> f = (function() {
  let x;
  yield
})
(function () {var x;yield;})
js> dis(f)
flags: LAMBDA NULL_CLOSURE
off     op
-----   --
00000:  generator
main:
00001:  getlocal 0
00004:  pop
00005:  push
00006:  yield        <-- trap goes here
00007:  pop
00008:  stop

Source notes:
 ofs  line    pc  delta desc     args
---- ---- ----- ------ -------- ------
  0:    1     1 [   1] newline 
  1:    2     1 [   0] decl     offset 0
  3:    2     5 [   4] newline 

js> trap(f, 6, undefined);
js> for (a in f())
  (function() {})()
Assertion failure: JSOp(*yieldpc) == JSOP_YIELD,
Assert is bogus in the presence of a trap.  Is it possible to trap a JSOP_YIELD?

http://hg.mozilla.org/projects/jaegermonkey/rev/c3ed353baad4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.