Comment #10 on issue 4211 by [email protected]: Wrong precedence for arrow function without parameters
https://code.google.com/p/v8/issues/detail?id=4211

With the current Git HEAD things are a bit worse than expected, while trying to figure out all of them to write them down in an unit test, I have found some corner cases that cause a crash, in particular:

   ()()=>foo   -> correctly throws SyntaxError
   (a)()=>foo  -> crash
   ()(a)=>foo  -> correctly throws SyntaxError
   (a)(b)=>foo -> crash

We will be making sure that these also throw SyntaxError, and that crashes do not happen anymore.

FWIW, in both of the crashes above, the stack trace is as follows:

  ./out/x64.debug/d8 --harmony-arrow-functions -e '(a)(b)=>bar'

  #
  # Fatal error in .././src/parser.h, line 1316
  # Check failed: parser_->allow_harmony_destructuring() || is_simple.
  #

  ==== C stack trace ===============================

   1: V8_Fatal
2: v8::internal::ParserTraits::DeclareFormalParameter(v8::internal::ParserFormalParameters*, v8::internal::Expression*, bool, v8::internal::ExpressionClassifier*) 3: v8::internal::ParserTraits::ParseArrowFunctionFormalParameters(v8::internal::ParserFormalParameters*, v8::internal::Expression*, v8::internal::Scanner::Location const&, v8::internal::Scanner::Location*, bool*) 4: v8::internal::ParserBase<v8::internal::ParserTraits>::ParseAssignmentExpression(bool, v8::internal::ExpressionClassifier*, bool*) 5: v8::internal::Parser::ParseVariableDeclarations(v8::internal::ParserBase<v8::internal::ParserTraits>::VariableDeclarationContext, v8::internal::Parser::DeclarationParsingResult*, bool*) 6: v8::internal::Parser::ParseVariableStatement(v8::internal::ParserBase<v8::internal::ParserTraits>::VariableDeclarationContext, v8::internal::ZoneList<v8::internal::AstRawString const*>*, bool*)
   7: v8::internal::Parser::ParseStatementListItem(bool*)
8: v8::internal::Parser::ParseStatementList(v8::internal::ZoneList<v8::internal::Statement*>*, int, bool*)
   9: v8::internal::Parser::DoParseProgram(v8::internal::ParseInfo*)
10: v8::internal::Parser::ParseProgram(v8::internal::Isolate*, v8::internal::ParseInfo*)
  11: v8::internal::Parser::Parse(v8::internal::ParseInfo*)
  12: v8::internal::Parser::ParseStatic(v8::internal::ParseInfo*)
  13: 0xbb02a4
14: v8::internal::Compiler::CompileScript(v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::Object>, int, int, v8::ScriptOriginOptions, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Context>, v8::Extension*, v8::internal::ScriptData**, v8::ScriptCompiler::CompileOptions, v8::internal::NativesFlag, bool) 15: v8::ScriptCompiler::CompileUnboundInternal(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, bool) 16: v8::ScriptCompiler::Compile(v8::Local<v8::Context>, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions) 17: v8::Shell::CompileString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::Value>, v8::ScriptCompiler::CompileOptions, v8::Shell::SourceType) 18: v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::Value>, bool, bool, v8::Shell::SourceType)
  19: v8::SourceGroup::Execute(v8::Isolate*)
  20: v8::Shell::RunMain(v8::Isolate*, int, char**)
  21: v8::Shell::Main(int, char**)
  22: main
  23: __libc_start_main
  24: _start


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to