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)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha1
People
(Reporter: sync2d, Assigned: brendan)
References
Details
(Keywords: crash, Whiteboard: [sg:critical])
Attachments
(2 files)
3.69 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
2.40 KB,
text/plain
|
Details |
$ 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.
Assignee | ||
Comment 1•18 years ago
|
||
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
Assignee | ||
Comment 2•18 years ago
|
||
Simplest fix, shorn of now-vacuous-seeming attempted assertions in jsemit.c.
/be
Attachment #243959 -
Flags: review?(mrbkap)
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
Updated•18 years ago
|
Attachment #243959 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 3•18 years ago
|
||
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
Comment 4•18 years ago
|
||
Updated•18 years ago
|
Flags: in-testsuite+
Comment 5•18 years ago
|
||
verified fixed 1.9 2006110700 windows/linux no crash but I didn't show a crash in the 1.8 branch.
Status: RESOLVED → VERIFIED
Updated•18 years ago
|
Group: security
Whiteboard: [sg:critical]
Updated•18 years ago
|
Flags: wanted1.8.1.x-
Comment 6•18 years ago
|
||
/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.
Description
•