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] [vm/ffi] Fix constant Finalizables #49411

Closed
dcharkes opened this issue Jul 7, 2022 · 6 comments
Closed

[CP] [vm/ffi] Fix constant Finalizables #49411

dcharkes opened this issue Jul 7, 2022 · 6 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request library-ffi

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Jul 7, 2022

Commit(s) to merge

d3ea8bf

Target

stable

Issue Description

class A implements Finalizable {}

void b([A? a]) {}

void main() {
  b();
}

crashes the compiler in dart compile exe.

What is the fix

The VM relied on only seeing expression types emitted by the transformer implementing finalizable in the CFE. However, further transforms could change that expression, in this instance to a constant. The fix is that the VM just accepts all expressions types.

Why cherry-pick

At least one user is running into this in production (cc @blaugold).

Risk

low

Issue link(s)

Extra Info

No response

@dcharkes dcharkes added the cherry-pick-review Issue that need cherry pick triage to approve label Jul 7, 2022
@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels Jul 7, 2022
@itsjustkevin
Copy link
Contributor

@vsmenon @mraleph @a-siva This is a small change that seems to be low risk. What are your thoughts on this CP? A decision today would allow this cp to make it into the next release.

@mraleph
Copy link
Member

mraleph commented Jul 11, 2022

I support CP

@vsmenon
Copy link
Member

vsmenon commented Jul 11, 2022

lgtm

1 similar comment
@a-siva
Copy link
Contributor

a-siva commented Jul 11, 2022

lgtm

@itsjustkevin itsjustkevin added cherry-pick-approved Label for approved cherrypick request and removed cherry-pick-review Issue that need cherry pick triage to approve labels Jul 12, 2022
@itsjustkevin
Copy link
Contributor

Approving the cherry pick based on consensus. Thank you everyone!

@whesse
Copy link
Contributor

whesse commented Jul 13, 2022

This was picked into stable 2.17.6

@whesse whesse closed this as completed Jul 13, 2022
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, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request library-ffi
Projects
None yet
Development

No branches or pull requests

8 participants