diff options
author | Petr Hosek <phosek@chromium.org> | 2019-05-02 17:24:53 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-05-02 17:24:53 +0000 |
commit | 145ecb53e9feb5ad2296843d5cc5a0edcd0e9fbd (patch) | |
tree | 9e00a06291ae440bb6bf54dbab03252e20ef92be | |
parent | 392b80b1c6c35c2fa8dc2261e01833a66cbb21f2 (diff) | |
download | compiler-rt-145ecb53e9feb5ad2296843d5cc5a0edcd0e9fbd.tar.gz |
[compiler-rt] Set the ZX_VMO_RESIZABLE option for zx_vmo_create
Currently VMO in Zircon create using the zx_vmo_create is resizable
by default, but we'll be changing this in the future, requiring an
explicit flag to make the VMO resizable.
Prepare for this change by passing ZX_VMO_RESIZABLE option to all
zx_vmo_create calls that need resizable VMO.
Differential Revision: https://reviews.llvm.org/D61450
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359803 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/profile/InstrProfilingPlatformFuchsia.c | 2 | ||||
-rw-r--r-- | lib/sanitizer_common/sanitizer_coverage_fuchsia.cc | 2 | ||||
-rw-r--r-- | lib/scudo/standalone/fuchsia.cc | 2 | ||||
-rw-r--r-- | lib/xray/xray_utils.cc | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/profile/InstrProfilingPlatformFuchsia.c b/lib/profile/InstrProfilingPlatformFuchsia.c index bed10f1e8..80beb4145 100644 --- a/lib/profile/InstrProfilingPlatformFuchsia.c +++ b/lib/profile/InstrProfilingPlatformFuchsia.c @@ -70,7 +70,7 @@ static uint32_t lprofVMOWriter(ProfDataWriter *This, ProfDataIOVec *IOVecs, return -1; /* Create VMO to hold the profile data. */ - Status = _zx_vmo_create(0, 0, &__llvm_profile_vmo); + Status = _zx_vmo_create(0, ZX_VMO_RESIZABLE, &__llvm_profile_vmo); if (Status != ZX_OK) return -1; diff --git a/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc b/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc index 1d927ceec..2c7180122 100644 --- a/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc +++ b/lib/sanitizer_common/sanitizer_coverage_fuchsia.cc @@ -132,7 +132,7 @@ class TracePcGuardController final { // The first sample goes at [1] to reserve [0] for the magic number. next_index_ = 1 + num_guards; - zx_status_t status = _zx_vmo_create(DataSize(), 0, &vmo_); + zx_status_t status = _zx_vmo_create(DataSize(), ZX_VMO_RESIZABLE, &vmo_); CHECK_EQ(status, ZX_OK); // Give the VMO a name including our process KOID so it's easy to spot. diff --git a/lib/scudo/standalone/fuchsia.cc b/lib/scudo/standalone/fuchsia.cc index 7a07ccd14..e54563138 100644 --- a/lib/scudo/standalone/fuchsia.cc +++ b/lib/scudo/standalone/fuchsia.cc @@ -80,7 +80,7 @@ void *map(void *Addr, uptr Size, const char *Name, uptr Flags, } } else { // Otherwise, create a Vmo and set its name. - Status = _zx_vmo_create(Size, 0, &Vmo); + Status = _zx_vmo_create(Size, ZX_VMO_RESIZABLE, &Vmo); if (Status != ZX_OK) { if (Status != ZX_ERR_NO_MEMORY || !AllowNoMem) dieOnMapUnmapError(Status == ZX_ERR_NO_MEMORY); diff --git a/lib/xray/xray_utils.cc b/lib/xray/xray_utils.cc index 59cd70cfe..82674baa5 100644 --- a/lib/xray/xray_utils.cc +++ b/lib/xray/xray_utils.cc @@ -78,7 +78,7 @@ void LogWriter::Flush() XRAY_NEVER_INSTRUMENT { LogWriter *LogWriter::Open() XRAY_NEVER_INSTRUMENT { // Create VMO to hold the profile data. zx_handle_t Vmo; - zx_status_t Status = _zx_vmo_create(0, 0, &Vmo); + zx_status_t Status = _zx_vmo_create(0, ZX_VMO_RESIZABLE, &Vmo); if (Status != ZX_OK) { Report("XRay: cannot create VMO: %s\n", _zx_status_get_string(Status)); return nullptr; |