Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser fuzz assertion failure: next.isIdentifier #38113

Closed
MichaelRFairhurst opened this issue Aug 29, 2019 · 3 comments
Closed

Parser fuzz assertion failure: next.isIdentifier #38113

MichaelRFairhurst opened this issue Aug 29, 2019 · 3 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta front-end-fasta-recovery fuzz-dust found with dust fuzz testing type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@MichaelRFairhurst
Copy link
Contributor

t{{r?this}}

I did not put type-bug because it's unclear to me if this assertion failure indicates an actual bug.

'package:front_end/src/fasta/parser/parser.dart': Failed assertion: line 5274 pos 14: 'next.isIdentifier': is not true.,
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)    
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)       
#2      Parser.parseExpressionStatementOrDeclarationAfterModifiers (package:front_end/src/fasta/parser/parser.dart:5274:14)
#3      Parser.parseStatementX (package:front_end/src/fasta/parser/parser.dart:3726:14)
#4      Parser.parseStatement (package:front_end/src/fasta/parser/parser.dart:3716:20)
#5      Parser.parseBlock (package:front_end/src/fasta/parser/parser.dart:5695:15)
#6      Parser.parseStatementX (package:front_end/src/fasta/parser/parser.dart:3732:14)
#7      Parser.parseStatement (package:front_end/src/fasta/parser/parser.dart:3716:20)

@danrubel

@vsmenon vsmenon added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Aug 29, 2019
@lrhn lrhn added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Aug 30, 2019
@lrhn
Copy link
Member

lrhn commented Aug 30, 2019

A failing assertions should not be reachable by any user input. In general, no user-facing Dart tool should fail with a thrown exception because it means the user won't get a good error message.
Syntax errors should be recongized and reported by the parser in a usable format.

@MichaelRFairhurst
Copy link
Contributor Author

@lrhn The failing assertion should not be reachable, yes, but this assertion error does not reach users because --enable-asserts is not on for any user facing tools by default.

Without --enable-asserts, this program does not crash.

It is however possible that without --enable-asserts the error messages get screwed up or something. I haven't looked deeply.

@danrubel
Copy link

danrubel commented Sep 6, 2019

If an assert fails, then an assumption in the parser is incorrect. Either the assert is incorrect and should be changed/removed, or there is a more subtle bug that needs to be addressed.

@danrubel danrubel self-assigned this Sep 6, 2019
@MichaelRFairhurst MichaelRFairhurst added the fuzz-dust found with dust fuzz testing label Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. front-end-fasta front-end-fasta-recovery fuzz-dust found with dust fuzz testing type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants