Skip to content

Kernel Verifier broken on platform.dill #30631

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
sjindel-google opened this issue Sep 6, 2017 · 5 comments
Closed

Kernel Verifier broken on platform.dill #30631

sjindel-google opened this issue Sep 6, 2017 · 5 comments
Labels
front-end-kernel legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on

Comments

@sjindel-google
Copy link
Contributor

Unhandled exception:
patched_sdk/lib/async/stream.dart:93:29: Verification error: StaticGet of 'dart.async::_EmptyStream::' without getter.

@sjindel-google sjindel-google added legacy-area-front-end Legacy: Use area-dart-model instead. area-kernel labels Sep 6, 2017
@sjindel-google sjindel-google self-assigned this Sep 6, 2017
@peter-ahe-google
Copy link
Contributor

I need a command line that reproduces this problem.

@sjindel-google
Copy link
Contributor Author

Here's the patch:

diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index 544e7aae7b..977ed7174a 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -18,7 +18,7 @@ import 'package:kernel/transformations/empty.dart' as empty;
 import 'package:kernel/transformations/method_call.dart' as method_call;
 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
 import 'package:kernel/transformations/treeshaker.dart' as treeshaker;
-// import 'package:kernel/verifier.dart';
+import 'package:kernel/verifier.dart';
 import 'package:kernel/transformations/coq.dart' as coq;
 
 import 'util.dart';
@@ -111,7 +111,7 @@ Future<CompilerOutcome> runTransformation(List<String> arguments) async {
   // TODO(30631): Fix the verifier so we can check that the transform produced
   // valid output.
   //
-  // verifyProgram(program);
+  verifyProgram(program);
 
   if (format == 'text') {
     writeProgramToText(program, path: output);

Here are the reproduction commands:

DART_CONFIGURATION=ReleaseX64 ./pkg/front_end/tool/fasta compile pkg/kernel/lib/ast.dart
out/ReleaseX64/dart -c ./pkg/kernel/bin/transform.dart -t empty -o /dev/null pkg/kernel/lib/ast.dart.dill

@mkustermann
Copy link
Member

This issue is due to the way we handle redirecting constructors, for example:

static factory •<T extends core::Object>() → link::LinkBuilder<link::LinkBuilder::•::T>
   let 
     dynamic #redirecting_factory = lin::LinkBuilderImplementation::• 
   in
     invalid-expression;

This has been a known issue for a while. If my memory serves, then Peter and Kevin were discussing some possible solutions to this problem.

Right now we have the kernel verifier disabled, which I think is a big red flag - it catches bugs early on and we should have it enabled.

Precisely because of this, I wanted to land cl/3002053002, which changes verifier.dart to allow this pattern pass verification until the redirecting factory issue has been solved!

@peter-ahe-google / @kmillikin Can we make the verifier.dart change?

@peter-ahe-google
Copy link
Contributor

Blocked on #29841

@peter-ahe-google peter-ahe-google added the status-blocked Blocked from making progress by another (referenced) issue label Oct 17, 2017
@jensjoha jensjoha added the P2 A bug or feature request we're likely to work on label Jan 10, 2018
@sjindel-google sjindel-google removed the status-blocked Blocked from making progress by another (referenced) issue label Mar 15, 2018
@sjindel-google sjindel-google removed their assignment Mar 15, 2018
@kmillikin kmillikin added legacy-area-front-end Legacy: Use area-dart-model instead. front-end-kernel and removed legacy-area-front-end Legacy: Use area-dart-model instead. area-kernel labels Sep 19, 2018
@johnniwinther
Copy link
Member

Fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end-kernel legacy-area-front-end Legacy: Use area-dart-model instead. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

6 participants