Last Comment Bug 695238 - Reflect.parse doesn't reject missing RHS in object literals
: Reflect.parse doesn't reject missing RHS in object literals
Status: RESOLVED FIXED
reflect-parse
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: Dave Herman [:dherman]
:
:
Mentors:
Depends on: 696109
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-17 17:22 PDT by Dave Herman [:dherman]
Modified: 2011-10-20 16:59 PDT (History)
3 users (show)
dherman: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
checks PNX_DESTRUCT bit on TOK_RC expression nodes (3.50 KB, patch)
2011-10-17 18:53 PDT, Dave Herman [:dherman]
jorendorff: review+
Details | Diff | Splinter Review

Description Dave Herman [:dherman] 2011-10-17 17:22:49 PDT
This should fail:

    Reflect.parse("({foo})")

but doesn't. The problem is that jsemit.cpp does the check (and throws a TypeError with JSMSG_BAD_OBJECT_INIT), and jsreflect.cpp is not doing the same check.

Fix should be easy: just check for the PNX_DESTRUCT bit, same as jsemit.cpp.

Dave
Comment 1 Dave Herman [:dherman] 2011-10-17 17:24:25 PDT
CC'ing Jesse, who may want to feed his fuzzer with some tasty new inputs.

Dave
Comment 2 Dave Herman [:dherman] 2011-10-17 18:53:42 PDT
Created attachment 567654 [details] [diff] [review]
checks PNX_DESTRUCT bit on TOK_RC expression nodes
Comment 4 Marco Bonardo [::mak] 2011-10-18 05:44:52 PDT
https://hg.mozilla.org/mozilla-central/rev/feeee0906588

Note You need to log in before you can comment on or make changes to this bug.