v8/test
aperez 3c3ce1bca8 Parser: Fix crash on stack overflow when lazy-parsing arrow functions
The problem manifests itself when parsing manages to return something
meaningful in the presence of a stack overflow. This happens because
calling ParserBase::Next() will still return one valid token on stack
overflow, before starting to return invalid tokens.

Take the following input as example:

        a.map(v => v + 1);
              | |
       already   next token
        parsed   (which will be an invalid token
  (identifier)   because of a stack overflow)

The "v" may have been already parsed into a VariableProxy, then if a
stack overflow occurs, next token will be an invalid token (instead
of Token::ARROW), but the parser will return the VariableProxy.

This always happens when lazy-parsing arrow functions, so the position
in the input stream where the the arrow function code ends is known.
This fix adds a check that ensures that parsing ended at the end
position of the arrow function.

BUG=465671
LOG=N

Review URL: https://codereview.chromium.org/1023483003

Cr-Commit-Position: refs/heads/master@{#27325}
2015-03-20 00:17:50 +00:00
..
benchmarks Enable test coverage for --turbo-deoptimization mode. 2015-01-16 12:53:30 +00:00
cctest Revert "Merge old data and pointer space." 2015-03-19 22:03:32 +00:00
intl Allow identifier code points from supplementary multilingual planes. 2014-10-10 07:13:46 +00:00
js-perf-test Fix lazy parsing for functions that use super. 2015-02-13 18:35:09 +00:00
message Beautify syntax error for unterminated argument list 2015-03-16 09:16:26 +00:00
mjsunit Parser: Fix crash on stack overflow when lazy-parsing arrow functions 2015-03-20 00:17:50 +00:00
mozilla [es6] Function length property should be configurable 2015-03-13 17:19:53 +00:00
preparser Remove --harmony-scoping flag. 2015-03-13 15:15:57 +00:00
promises-aplus Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
test262 [es6] Function length property should be configurable 2015-03-13 17:19:53 +00:00
test262-es6 [es6] Function length property should be configurable 2015-03-13 17:19:53 +00:00
unittests [turbofan] Remove last_use_ field from Node. 2015-03-19 15:44:35 +00:00
webkit [es6] Function length property should be configurable 2015-03-13 17:19:53 +00:00