-
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
Implementing Finalizable
causes unhandled exception in FrontendCompiler
#49075
Comments
Maybe @dcharkes has some insight on this since he implemented |
#49122 looks very similar to this issue, but much easier to reproduce and not specific to |
I was able to reproduce the same issue in my project and found the root of problem, this could be any async operation with saving a finalizable instance to a variable
Dart SDK version: 2.17.1 (stable) on "macos_arm64" |
Fix underway: https://dart-review.googlesource.com/c/sdk/+/246520 |
Thanks @voledyaev for making the minimal repro, that was really useful! 🚀 |
We were adding fences around the variable declaration expressions including the variable that was not declared. This led to verification errors and crashes when not running the verifier. `Verification error: Variable 'VariableDeclarationImpl(final MyFinalizable myFinalizable)' used out of scope.` TEST=pkg/vm/testcases/transformations/ffi/regress_49075.dart Closes: #49075 Change-Id: I1f07f0343d29c3efb3c63c0aa0e3f20338b5c653 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246520 Commit-Queue: Daco Harkes <[email protected]> Reviewed-by: Jens Johansen <[email protected]>
This is a patch release that fixes: - Improve analysis of enums and switch (issue [#49188]). - Fix compiler crash when initializing Finalizable objects (issue [#49075]). [#49188]: #49188 [#49075]: #49075 Change-Id: If2059474ce2acbadf7f3c6e407f0087d262e2842 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249161 Reviewed-by: Michael Thomsen <[email protected]>
When adding
Finalizable
to a specific class in my project, I get the following exception when runningdart test
:Dart version:
Steps to replicate:
When
FfiReplicator
is not implementingFinalizable
the error goes away.The text was updated successfully, but these errors were encountered: