Closed Bug 358508 Opened 18 years ago Closed 18 years ago

crash with destructuring-parameters and block-local-functions

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9alpha1

People

(Reporter: sync2d, Assigned: brendan)

References

Details

(Keywords: crash, Whiteboard: [sg:critical])

Attachments

(2 files)

$ cat bad-block-object.txt (function({0x100000badf00d0: a}) { function b() {} let c; })(); $ dbg.obj/js -v 170 bad-block-object.txt Assertion failure: *pc == JSOP_ENTERBLOCK || (*pc == JSOP_LITOPX && pc[1 + LITERAL_INDEX_LEN] == JSOP_ENTERBLOCK), at jsemit.c:3992 $ gdb --eval run --args opt.obj/js -v 170 bad-block-object.txt ... Program received signal SIGSEGV, Segmentation fault. 0x0042fc58 in js_GetScopeChain (cx=0xab07a0, fp=0x9b3524) at jsinterp.c:508 508 parent = OBJ_GET_PARENT(cx, cursor); (gdb) p *cursor $1 = {map = 0xbadf00d0, slots = 0x43300000} exploitable.
Ahem. I should have remembered destructuring formal parameters. Fixing shortly, will put a 1.8 combined patch in the other bug. Thanks for finding this so quickly. /be
Assignee: general → brendan
Simplest fix, shorn of now-vacuous-seeming attempted assertions in jsemit.c. /be
Attachment #243959 - Flags: review?(mrbkap)
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
Attachment #243959 - Flags: review?(mrbkap) → review+
Fixed: Checking in jsemit.c; /cvsroot/mozilla/js/src/jsemit.c,v <-- jsemit.c new revision: 3.226; previous revision: 3.225 done Checking in jsinterp.c; /cvsroot/mozilla/js/src/jsinterp.c,v <-- jsinterp.c new revision: 3.302; previous revision: 3.301 done /be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
verified fixed 1.9 2006110700 windows/linux no crash but I didn't show a crash in the 1.8 branch.
Status: RESOLVED → VERIFIED
Group: security
Whiteboard: [sg:critical]
Flags: wanted1.8.1.x-
/cvsroot/mozilla/js/tests/js1_7/block/regress-358508.js,v <-- regress-358508.js initial revision: 1.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: