-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Example:
import 'dart:ffi';
void main(List<String> args) {
late final List<String> list;
final callback = NativeCallable<Void Function()>.isolateGroupBound(() {
list.add('hey');
});
list = [];
callback.nativeFunction.asFunction<void Function()>().call();
print(list);
callback.close();
}late final variables can be initialized later, after isolate group callback is created, so they are somewhat mutable. This would bypass check that values of captured variables are shareable and would allow sharing arbitrary mutable Dart objects between isolate group callback and Dart isolate.
/cc @aam
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)