================
@@ -0,0 +1,82 @@
+# Hardware-assisted AddressSanitizer
+
+```{contents}
+:local: true
+```
+
+## Introduction
+
+Hardware-assisted AddressSanitizer (HWASan) is a memory error detector similar
+to {doc}`AddressSanitizer`, but based on memory tagging and address tagging
+(such as Top-Byte Ignore on AArch64). It provides similar bug detection with
+significantly lower memory overhead (~10–20%).
+
+HWASan can detect:
+
+- Out-of-bounds accesses (heap, stack, and globals)
+- Use-after-free
+- Use-after-return and use-after-scope
+- Double-free and invalid free
+
+## Supported Platforms
+
+- **Linux AArch64** (kernel 5.4+ with tagged address ABI)
+- **Android AArch64**
+- **Linux RISC-V 64**
+- **Linux x86_64** (experimental)
+
+## Usage
+
+Compile and link your program with `-fsanitize=hwaddress`:
+
+```console
+% cat example.c
+#include <stdlib.h>
+
+int main() {
+ char *volatile x = (char *)malloc(10);
+ free(x);
+ return x[5]; // Use-after-free!
+}
+
+% clang -O1 -g -fsanitize=hwaddress example.c
+% ./a.out
----------------
vitalybuka wrote:
is this real or mock?
better to get real one from Arm machine
https://github.com/llvm/llvm-project/pull/220075
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits