-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] [dart2wasm] Fix partial instantiation constants #56440
Comments
/cc @kevmoo for visibility (we want this to be also included in the dot release) |
Summary: The Dart2Wasm compiler crashes when using partially instantiated generic methods with named parameters. This fix addresses the issue by correcting the code that handles these constants. |
@athomas Could we get this approved so it gets included in the upcoming hotfix release? |
@mkustermann based on previous discussions, I am going to mark this cherry-pick approved. |
Partial instantiation constants are closures. Those closures have vtables with all entries needed for the closure representation corresponding to the instantiated closure. The entries of those vtables have to either call the corresponding method of the generic closure, or are unreachable dummy entries. Dummy entries can be required due to clustering callees/callers together where a particular target doesn't support the name combination. The case that was incorrect is if the particular name combination did not get clustered with anything for the generic closure representation. Issue #56372 TEST=web/wasm/regress_56372_test Bug: #56372 Change-Id: I7a219237519c39d982b89ce272f33fb4d90cd173 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/380100 Cherry-pick-request: #56440 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380120 Reviewed-by: Ömer Ağacan <[email protected]> Commit-Queue: Martin Kustermann <[email protected]>
Thanks a lot, @itsjustkevin. Merged the PR (No more cherry-picks for dart2wasm in the SDK (still one dependent in flutter/flutter - flutter/flutter#153310) ) |
Commit(s) to merge
f7fc4d0
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/380120
Issue Description
Using partial instantiation constants of generic methods with named parameters can in certain situations lead to compiler crashes.
What is the fix
Fix the code that handles partial instantiation constants in dart2wasm.
Why cherry-pick
Users have hit this problem.
Risk
If all tests pass: low.
Issue link(s)
#56372
Extra Info
No response
The text was updated successfully, but these errors were encountered: