Reflect.parse(): TOK_NAME statement nodes with pn_lexdef

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: dherman, Assigned: dherman)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
js> Reflect.parse("function f() { function g() { } function g() { } }")
Assertion failure: unexpected statement type, at ../jsreflect.cpp:1899
Segmentation fault
(Assignee)

Comment 1

8 years ago
Created attachment 469960 [details] [diff] [review]
follow the pn_lexdef link to find the real parse node

Fix attached.

Dave
(Assignee)

Updated

8 years ago
Attachment #469960 - Flags: review?(cdleary)
Comment on attachment 469960 [details] [diff] [review]
follow the pn_lexdef link to find the real parse node

This fix looks correct, but there are probably some more def/use chain crashers lurking: 'Reflect.parse("function f(g) { function g() { } function g() { } }' asserts out for me.
Attachment #469960 - Flags: review?(cdleary) → review+
(Assignee)

Comment 3

8 years ago
With the patches applied, WFM. If you see other def/use chain issues, though, please let me know.

Dave
(Assignee)

Comment 4

8 years ago
http://hg.mozilla.org/tracemonkey/rev/e13778864fca
Whiteboard: fixed-in-tracemonkey
(Assignee)

Comment 5

8 years ago
> With the patches applied, WFM.

Ah, the test case in comment 2 is a dup of bug 591437. With that bug's fix it works.

Dave
http://hg.mozilla.org/mozilla-central/rev/e13778864fca
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.