This repository was archived by the owner on Feb 25, 2025. It is now read-only.
fuchsia: remove use of replace_as_executable (second try) #17313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a second attempt at #16690, which was reverted because it broke the Dart JIT runner. The primary differences are that this time around, we correctly handle absolute vs relative paths, depending on whether library loading bottoms out in
fdio_open_fdorfdio_open_fd_at. I've added additional assertions.On Fuchsia, we can now get executable VMOs from trusted backing
filesystems. This allows us to remove the use of replace_as_executable
in favor of opening files with
fdio_open_fd_atwith theOPEN_RIGHT_EXECUTABLEflag and getting VMOs by callingfdio_get_vmo_exec.By moving the responsibility for executability into the filesystem, we
are able to remove
deprecated-ambient-replace-as-executablefromcomponent manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator). It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.
Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset). If there's any additional pre-flight checks you'd like me to do, let me know!