Closed Bug 416834 Opened 17 years ago Closed 17 years ago

Assertion failure after deleting eval 16 times

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files, 1 obsolete file)

this.__proto__.x = eval; for (i = 0; i < 16; ++i) delete eval; (function w() { x = 1; })(); triggers Assertion failure: !entry || entry->kpc == ((PCVCAP_TAG(entry->vcap) > 1) ? (jsbytecode *) JSID_TO_ATOM(id) : cx->fp->pc), at jsobj.c:3423
The assertion condition changed in bug 421274. The testcase in this bug still triggers the assertion. Assertion failure: entry->kpc == ((PCVCAP_TAG(entry->vcap) > 1) ? (jsbytecode *) JSID_TO_ATOM(id) : cx->fp->regs->pc), at jsobj.c:3477
See bug 424311 for another way to trigger this assertion.
The shell uses JS_ResolveStandardClass even when JSRESOLVE_ASSIGNING, which is a bug, but not the bug. This means each delete eval reference will resolve via the JSOP_BINDNAME bytecode the 'eval' identifier. This somehow results in a 16-deep prototype chain being created. I didn't have time to debug fully, but it appeared as though js_InitFunctionAndObjectClasses etc. were not suppressing recursion or otherwise being idempotent as before. Igor, could the function changes have broken how JSProto_Function is initialized? /be
WFM.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Attached file js1_5/extensions/regress-416834.js (deleted) —
BUGNUMBER: 416834 STATUS: Do not assert: !entry || entry->kpc == ((PCVCAP_TAG(entry->vcap) > 1) ? (jsbytecode *) JSID_TO_ATOM(id) : cx->fp->pc) Assertion failure: entry->kpc == ((PCVCAP_TAG(entry->vcap) > 1) ? (jsbytecode *) JSID_TO_ATOM(id) : cx->fp->regs->pc), at jsobj.c:3491 Aborted
Status: RESOLVED → REOPENED
Flags: blocking1.9?
Resolution: WORKSFORME → ---
Assignee: general → igor
Status: REOPENED → NEW
Why would someone delete eval happen 16 times? Do we know if this is exploitable? Does this only happen if you are fuzzing? Need more info here if we're to block on this.
Flags: blocking1.9? → blocking1.9-
Marking this blocking 1.9 as it should definitely block final based on conversation with Brendan.
Flags: blocking1.9- → blocking1.9+
Depends on: 352604
Attached patch wallpaper (obsolete) (deleted) — Splinter Review
I don't understand this code well enough to know whether this is simply wallpaper or not. It does fix the assertion.
Attachment #314597 - Flags: review?(brendan)
Attached patch Alternative (deleted) — Splinter Review
This is an alternative that avoids the assertion. It adds the entry nulling into the most central place.
Assignee: igor → mrbkap
Attachment #314597 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #314626 - Flags: review?(brendan)
Attachment #314597 - Flags: review?(brendan)
If we're choosing wallpaper, I think I like mrbkap's better. :)
Comment on attachment 314626 [details] [diff] [review] Alternative Yeah, my bad -- thanks for fixing. Safe 1.9-ready fix. /be
Attachment #314626 - Flags: review?(brendan)
Attachment #314626 - Flags: review+
Attachment #314626 - Flags: approval1.9?
Comment on attachment 314626 [details] [diff] [review] Alternative a1.9=beltzner
Attachment #314626 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Blocks: 428366
jsinterp.c:3.490
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Patch for the underlying problem in bug 428366.
/cvsroot/mozilla/js/tests/js1_5/extensions/regress-416834.js,v <-- regress-416834.js initial revision: 1.1
Flags: in-testsuite?
Flags: in-testsuite+
Flags: in-litmus-
v 1.9.0
Status: RESOLVED → VERIFIED
/cvsroot/mozilla/js/tests/public-failures.txt,v <-- public-failures.txt new revision: 1.68; previous revision: 1.67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: