Skip to content

VirtualMemory::DuplicateRX doesn't work on Fuchsia #52579

Description

@liamappelbe

Specifically the call to Protect(..., kReadExecute) (which calls zx_vmar_protect) fails. This is why the FfiCallbackMetadata 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 to zx_vmar_map, analogous to the vm_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

Metadata

Metadata

Labels

P3A lower priority bug or feature requestarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.os-fuchsiatriagedIssue has been triaged by sub team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions