[vm/ffi] Calling NativeCallable.listener
from a NativeFinalizer
callback
#54939
Labels
area-vm
Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
library-ffi
P2
A bug or feature request we're likely to work on
Currently, calling a
NativeCallable.listener
from aNativeFinalizer
callback hits an assert:sdk/runtime/vm/runtime_entry.cc
Lines 4037 to 4043 in 1e0223e
The assumption is that if we have a current thread, it must be in native code. However, when the
NativeCallable.listener
is called from a finalizer callback, we have a current thread, but it is in the VM.Repro: https://github.com/dart-lang/native/tree/native-finalizer/pkgs/native_assets_cli/example/native_add_library
@liamappelbe Could you please take a look at supporting this use case?
cc @mkustermann
The text was updated successfully, but these errors were encountered: