Closed Bug 552196 Opened 14 years ago Closed 14 years ago

TM: "Assertion failure: size_t(p - cx->fp->slots) < cx->fp->script->nslots, at ../jstracer.cpp" or "Assertion failure: size_t(p - cx->fp->slots()) < cx->fp->script->nslots, at ../jstracer.cpp"

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: gkw, Assigned: dvander)

References

Details

(Keywords: assertion, regression, testcase, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

(Function("\
  for (a = 0; a < 5; a++)\
  (function f(b) {\
    if (b > 0) {\
      f(b - 1)\
    }\
  })\
  (3)\
"))()

asserts js debug shell with -j on TM tip at Assertion failure: size_t(p - cx->fp->slots) < cx->fp->script->nslots, at ../jstracer.cpp:2545
autoBisect shows this is probably related to bug 551705:

The first bad revision is:
changeset:   38596:1f812d89de66
user:        David Anderson
date:        Fri Mar 12 11:47:44 2010 -0800
summary:     Fixed regression with recursion and type unstable frame slurping (bug 551705, r=gal).
Blocks: 551705
Also asserts at:

Assertion failure: size_t(p - cx->fp->slots()) < cx->fp->script->nslots, at ../jstracer.cpp:2546

on JM tip.
Summary: TM: "Assertion failure: size_t(p - cx->fp->slots) < cx->fp->script->nslots, at ../jstracer.cpp" → TM: "Assertion failure: size_t(p - cx->fp->slots) < cx->fp->script->nslots, at ../jstracer.cpp" or "Assertion failure: size_t(p - cx->fp->slots()) < cx->fp->script->nslots, at ../jstracer.cpp"
Assignee: general → dvander
Attached patch fixSplinter Review
Bleh. Backing out this part of the code in bug 551705 was not entirely correct. If branching directly off a JSOP_STOP, there's no stackval(-1) to read. Fortunately it is valid (and necessary) to read regs.pc iff not anchoring off a "slurp fail exit", to see where to get the return value from.

This patch contains a free prize at the bottom: a big comment explaining what slurpDownFrames is.
Attachment #434007 - Flags: review?(gal)
Attachment #434007 - Flags: review?(gal) → review+
Pushed to tracemonkey at Gary's request. Hope this is ok!

http://hg.mozilla.org/tracemonkey/rev/9a0a4c64da0a
Whiteboard: fixed-in-tracemonkey
Thanks Jason and everyone. This was kind-of hurting TM fuzzing for awhile.
http://hg.mozilla.org/mozilla-central/rev/9a0a4c64da0a
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
A testcase for this bug was automatically identified at js/src/jit-test/tests/basic/bug552196.js.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: