Skip to content

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

Closed

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

Activity

  1. added
    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
    on Jun 1, 2023
  2. added
    P3A lower priority bug or feature request
    triagedIssue has been triaged by sub team
    on Nov 30, 2023
  3. rmacnak-google commented on Apr 9, 2026

    @rmacnak-google
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions