[PATCH] D44770: [sanitizer] zx_vmo_write on Fuchsia takes only 4 arguments now

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 17:01:56 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT328273: [sanitizer] zx_vmo_write on Fuchsia takes only 4 arguments now (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44770?vs=139416&id=139534#toc

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44770

Files:
  lib/sanitizer_common/sanitizer_fuchsia.cc


Index: lib/sanitizer_common/sanitizer_fuchsia.cc
===================================================================
--- lib/sanitizer_common/sanitizer_fuchsia.cc
+++ lib/sanitizer_common/sanitizer_fuchsia.cc
@@ -418,16 +418,7 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44770.139534.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180323/545e99ad/attachment.bin>


More information about the llvm-commits mailing list