FFI creates closures which are not present in the kernel program #54172
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-ffi
P2
A bug or feature request we're likely to work on
triaged
Issue has been triaged by sub team
NativeFunctionPointer.asFunction
andDynamicLibraryExtension.lookupFunction
fromdart:ffi
are implemented using opaque_asFunctionInternal
which is declared in the following way:_asFunctionInternal
can magically create and return closures which are not present in the kernel program. As a result, whole-program analysis (TFA) cannot see all possible closures in the program which hinders its ability to analyze possible targets of closure calls (this issue blocks #39692).I see the following possible solutions:
_asFunctionInternal
specially during TFA (maybe add a special pragma for that purpose).@dcharkes @mkustermann Thoughts?
The text was updated successfully, but these errors were encountered: