diff options
author | Petr Hosek <phosek@chromium.org> | 2018-03-22 23:58:37 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-03-22 23:58:37 +0000 |
commit | f4ec686bf7a1af2ce3362da35ea983b0cda9ff70 (patch) | |
tree | 0b0b8d0743d6e91b0e9fdb7f592c26b93818652f | |
parent | fab7a676c23e3f8d56a9071fbe9701aef9332db1 (diff) | |
download | bcm5719-llvm-f4ec686bf7a1af2ce3362da35ea983b0cda9ff70.tar.gz bcm5719-llvm-f4ec686bf7a1af2ce3362da35ea983b0cda9ff70.zip |
[sanitizer] zx_vmo_write on Fuchsia takes only 4 arguments now
The system call now fails when it cannot write the requested size.
Update the sanitizer runtime Fuchsia implementation accordingly.
Differential Revision: https://reviews.llvm.org/D44770
llvm-svn: 328273
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc index 924ba729bf4..b153e4950b3 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc @@ -418,16 +418,7 @@ bool IsAccessibleMemoryRange(uptr beg, uptr size) { zx_handle_t vmo; zx_status_t status = _zx_vmo_create(size, 0, &vmo); if (status == ZX_OK) { - while (size > 0) { - size_t wrote; - status = _zx_vmo_write(vmo, reinterpret_cast<const void *>(beg), 0, size, - &wrote); - if (status != ZX_OK) break; - CHECK_GT(wrote, 0); - CHECK_LE(wrote, size); - beg += wrote; - size -= wrote; - } + status = _zx_vmo_write(vmo, reinterpret_cast<const void *>(beg), 0, size); _zx_handle_close(vmo); } return status == ZX_OK; |