Skip to content

Analyzer fuzz crash: invoking const constructor #38204

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

Closed
MichaelRFairhurst opened this issue Sep 5, 2019 · 3 comments
Closed

Analyzer fuzz crash: invoking const constructor #38204

MichaelRFairhurst opened this issue Sep 5, 2019 · 3 comments
Assignees
Labels
crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. fuzz-dust found with dust fuzz testing legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@MichaelRFairhurst
Copy link
Contributor

class C<T> {
  const C(this.x);
  f() {
    const C(null);
  }
}

Note: this only fails in summary1, not summary2, making it potentially lower priority. Though this does seem to be really easy to hit (and has been hit in #37996), so might be worth the effort of fixing in the mean time.

NoSuchMethodError: The getter 'type' was called on null.
Receiver: null
Tried calling: type
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      VariableMember.type (package:analyzer/src/dart/element/member.dart:1053:61)
#2      ConstantEvaluationEngine.evaluateConstructorCall (package:analyzer/src/dart/constant/evaluation.dart:626:40)
#3      ConstantVerifier.visitInstanceCreationExpression (package:analyzer/src/dart/constant/constant_verifier.dart:134:27)
#4      InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:6180:15)
#5      ExpressionStatementImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3770:18)
#6      RecursiveAstVisitor.visitExpressionStatement (package:analyzer/dart/ast/visitor.dart:833:10)
#7      ExpressionStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:3766:49)
#8      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7670:20)
#9      BlockImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1115:17)
#10     RecursiveAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:665:10)
@MichaelRFairhurst MichaelRFairhurst added legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. labels Sep 5, 2019
@bwilkerson
Copy link
Member

I don't think there's any "mean time" any more. Feel free to re-open if I'm wrong.

@MichaelRFairhurst
Copy link
Contributor Author

Hmm. This does indeed seem to fail in summary2. Just hit this there. Not sure why I had originally thought otherwise.

@scheglov scheglov self-assigned this Sep 12, 2019
@scheglov
Copy link
Contributor

Also fixed by c6b0ae1.

@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
crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. fuzz-dust found with dust fuzz testing legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants