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

[CP] Fix AOT compiler crash #55557

Open
alexmarkov opened this issue Apr 24, 2024 · 5 comments
Open

[CP] Fix AOT compiler crash #55557

alexmarkov opened this issue Apr 24, 2024 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve

Comments

@alexmarkov
Copy link
Contributor

Commit(s) to merge

778a413

Target

beta

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/364380

Issue Description

AOT compiler crashes in the following case:

  • late final field has a generic type (parameterized with a class type parameter) and initializer;
  • field initializer has a closure which captures this.

What is the fix

Do not visit field initializer when generating field guard summary in order to avoid incorrect capturing of the receiver.

Why cherry-pick

This is a regression in beta branch.

Risk

Low.

Issue link(s)

flutter/flutter#147239

Extra Info

No response

@alexmarkov alexmarkov added the cherry-pick-review Issue that need cherry pick triage to approve label Apr 24, 2024
@alexmarkov
Copy link
Contributor Author

/cc @mraleph @a-siva

@a-siva
Copy link
Contributor

a-siva commented Apr 24, 2024

lgtm

@mit-mit
Copy link
Member

mit-mit commented Apr 24, 2024

sgtm

@devoncarew devoncarew added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Apr 25, 2024
@a-siva
Copy link
Contributor

a-siva commented Apr 25, 2024

@itsjustkevin do we have a green signal for Alex to land the cherry pick ?

@itsjustkevin itsjustkevin added the cherry-pick-approved Label for approved cherrypick request label Apr 26, 2024
@itsjustkevin
Copy link
Contributor

Approved, please land @alexmarkov

copybara-service bot pushed a commit that referenced this issue Apr 26, 2024
…d receiver

When building a field guard summary, field initializer is not included
into the body. So field initializer AST should not be visited to
calculate captured variables and field guard summary
should not have a captured reveiver.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter147239.dart

Issue: flutter/flutter#147239
Change-Id: Ibb4827edcfb253c13ac40e6167a447ad36d9eb5e
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/364203
Cherry-pick-request: #55557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364380
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
@itsjustkevin itsjustkevin added the cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve
Projects
None yet
Development

No branches or pull requests

8 participants