[PATCH] D40568: design document for a hardware-assisted memory safety (HWAMS) tool, similar to AddressSanitizer

Kostya Serebryany via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 17:36:35 PST 2017


kcc added inline comments.


================
Comment at: docs/TaggedAddressSanitizerDesign.rst:22
+*quarantine* to find use-after-free.
+The shadow, the redzones, and the quarantine are the
+major sources of AddressSanitizer's memory overhead.
----------------
davidxl wrote:
> What is the overhead of redzones compared with shadow memory?
depends.
shadow is 1/9 of all memory.
redzones largely depend on the allocation patterns. 
If most heap allocations are big, the combined redzones are tiny, and vise versa 



================
Comment at: docs/TaggedAddressSanitizerDesign.rst:49
+---------------
+All memory accesses are prefixed with a call to a run-time function
+that loads the memory tag, compares it with the
----------------
davidxl wrote:
> a real runtime call or it will be lowered into inline sequence?
at least in the initial implementation -- yes. 
Since this is aarc64-specific, the call/ret should be relatively cheap. 
But of course nothing prevents us from inlining if we see a need for it. 


Repository:
  rC Clang

https://reviews.llvm.org/D40568





More information about the cfe-commits mailing list