-
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
Destructuring record that contains Finalizable
throws "Attempt to execute code removed by Dart AOT compiler (TFA)"
#54414
Comments
Actually, here is a minimal reproducible example: import 'dart:ffi';
void main() {
final (a, _) = b();
print(a);
}
class A implements Finalizable {}
(A, bool) b() => (A(), true);
|
Finalizable
throws "Attempt to execute code removed by Dart AOT compiler (TFA)"
…zable` Dart SDK issue: dart-lang/sdk#54414
…zable` (#546) Dart SDK issue: dart-lang/sdk#54414
/cc @dcharkes |
I suspect we have another corner case with the finalizable transform, some previous corner cases:
Let me investigate what the compiler makes of this.
Gets turned into
Basically, we have a fence on the variable before it get's projected out from the record.
|
Fix: https://dart-review.googlesource.com/c/sdk/+/343180 Thanks for reporting @blaugold ! |
@dcharkes Can this be closed ? |
I'd like someone from the VM team to review the fix and land it first. |
This is to avoid a few Dart compiler bugs related to Finalizable objects: - dart-lang/sdk#54414 - dart-lang/sdk#52596 - dart-lang/sdk#51538
This is to avoid a few Dart compiler bugs related to Finalizable objects: - dart-lang/sdk#54414 - dart-lang/sdk#52596 - dart-lang/sdk#51538
* Bump required sdk version to ^3.3.0 This is to avoid a few Dart compiler bugs related to Finalizable objects: - dart-lang/sdk#54414 - dart-lang/sdk#52596 - dart-lang/sdk#51538 * Update CHANGELOG
This tracker is for issues related to:
Executing the following program (see this repository for a full repro) causes "Attempt to execute code removed by Dart AOT compiler (TFA)" to be thrown:
The text was updated successfully, but these errors were encountered: