VirtualMemory::DuplicateRX doesn't work on Fuchsia #52579
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
os-fuchsia
P3
A lower priority bug or feature request
triaged
Issue has been triaged by sub team
Specifically the call to
Protect(..., kReadExecute)
(which callszx_vmar_protect
) fails. This is why theFfiCallbackMetadata
migration had to be reverted.To fix this,
VirtualMemory::DuplicateRX
needs to be special cased, like it is for MacOS. In fact the implementation will be similar to the MacOS version. We'll need a call tozx_vmar_map
, analogous to thevm_remap
call, which remaps our executable memory over an existing writable memory. This requires special permissions that the ordinary VMO used by the rest of virtual_memory_fuchsia.cc doesn't have.So we need the VMO that is created when the embedder loads the app's .so file in executable mode. At the moment the flutter embedder just discards this VMO, but we need to plumb it though Dart_Initialize to VirtualMemory.
cc @rmacnak-google
The text was updated successfully, but these errors were encountered: