[PATCH] D58184: [scudo][standalone] Introduce platform specific code & mutexes

Dave Moore via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 09:30:47 PST 2019


dmmoore415 added inline comments.


================
Comment at: lib/scudo/standalone/fuchsia.cc:62
+// Returns the offset of an address range in a Vmar, while checking that said
+// range fully belongs to the Vmar. An alternive would be to keep track of both
+// the base & length to avoid calling this. The tradeoff being a system call vs
----------------
sp: alternive


================
Comment at: lib/scudo/standalone/fuchsia.cc:131
+  } else {
+    _zx_handle_close(Vmo);
+  }
----------------
Shouldn't you at least check and log a bad status here?


================
Comment at: lib/scudo/standalone/fuchsia.cc:149
+    // Destroying the vmar effectively unmaps the whole mapping.
+    _zx_vmar_destroy(Vmar);
+    _zx_handle_close(Vmar);
----------------
while there's not much we can do if these things fail, maybe we should at least log them so that leaks can be discovered. There are several other cases like this. Is it Fuchsia style to ignore failures on things like this?


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58184/new/

https://reviews.llvm.org/D58184





More information about the llvm-commits mailing list