mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
[fuchsia] Add zx_vmo_replace_as_executable to tests
Fuchsia in the future will create VMOs as non-executable (i.e., without ZX_RIGHT_EXECUTE) by default, so this necessary preparation for that. Change-Id: I00ada804d1d16db4f50ff3882058e382b1845328 Reviewed-on: https://chromium-review.googlesource.com/c/1419778 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Matthew Dempsky <mdempsky@chromium.org>
This commit is contained in:
parent
79f4a3970a
commit
1fc95dc3cc
@ -58,6 +58,8 @@ CRASHPAD_CHILD_TEST_MAIN(AddressSpaceChildTestMain) {
|
||||
const size_t size = t.pages * PAGE_SIZE;
|
||||
zx_status_t status = zx_vmo_create(size, 0, &vmo);
|
||||
ZX_CHECK(status == ZX_OK, status) << "zx_vmo_create";
|
||||
status = zx_vmo_replace_as_executable(vmo, ZX_HANDLE_INVALID, &vmo);
|
||||
ZX_CHECK(status == ZX_OK, status) << "zx_vmo_replace_as_executable";
|
||||
uintptr_t mapping_addr = 0;
|
||||
status = zx_vmar_map(
|
||||
zx_vmar_root_self(), t.zircon_perm, 0, vmo, 0, size, &mapping_addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user