Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Emit Better Error Message for Function Declarations in Invalid Locations #19

Open
IgnoredAmbience opened this issue May 1, 2015 · 5 comments

Comments

@IgnoredAmbience
Copy link
Member

On the conrad-v8-merged branch (I think), latest revision.
The following test cases aborted with a hard crash from somewhere in the parser or its interface.

Quick diagnosis would be appreciated so I can classify the bug or choose to ignore it for the CAV'15 paper writeup.

Record 1
id 1753444
test_id tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js
batch_id 438447
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
Record 2
id 1754068
test_id tests/test262/ch12/12.14/12.14-13.js
batch_id 438603
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
Record 3
id 1753805
test_id tests/test262/ch12/12.8/S12.8_A3.js
batch_id 438537
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
Record 4
id 1753802
test_id tests/test262/ch12/12.8/S12.8_A4_T1.js
batch_id 438536
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
Record 5
id 1753807
test_id tests/test262/ch12/12.8/S12.8_A4_T2.js
batch_id 438537
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
Record 6
id 1753806
test_id tests/test262/ch12/12.8/S12.8_A4_T3.js
batch_id 438537
result ABORT
exit_code 2
stdout
stderr Fatal error: exception Parser.InvalidArgument
duration 0
@IgnoredAmbience
Copy link
Member Author

There's no other stdout/stderr output collected by the runtests.py script, it could have got lost somewhere, if other output is present on the console, we should log a minor bug against that, too.

@IgnoredAmbience
Copy link
Member Author

This is our old friend of permitted locations for function declaration syntax. (Thanks @Pasteuriser for confirming.)

Classifying as buggy tests.

We should emit a better error message in this instance.

@IgnoredAmbience IgnoredAmbience changed the title Conrad Branch: Parser Aborts Emit Better Error Message for Function Declarations in Invalid Locations May 1, 2015
@IgnoredAmbience IgnoredAmbience removed this from the CAV Paper milestone May 1, 2015
@IgnoredAmbience
Copy link
Member Author

Also tests/test262/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js

@conrad-watt
Copy link

One thing I didn't appreciate before; in ES6, this syntax will be standard-compliant, since FunctionDeclarations can now occur in a block (and the declaration is block-scoped). However, there are some tests here from 2009 and possibly earlier, so I don't think this is a case of eager conformance.

@IgnoredAmbience
Copy link
Member Author

Yep, I had in the back of my head that they were going to get rid of these sort of discrepancies between the standard and common use (proto, is another example, I believe)

It was a bug in the test262 es5 suite, and that's how I've classified it...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants