From 4171a71cbc8ea66b1ee99ab31f4e804f50633a0c Mon Sep 17 00:00:00 2001 From: David Justo Date: Tue, 16 Sep 2025 12:03:51 -0700 Subject: [PATCH] Note that the state of ASan shadow bytes is 'addressable' (#6084) * Note that the state of ASan shadow bytes is 'addressable' * typo: populate -> populated --- docs/sanitizers/asan-shadow-bytes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/sanitizers/asan-shadow-bytes.md b/docs/sanitizers/asan-shadow-bytes.md index a4d57f7c9f0..a59597629b8 100644 --- a/docs/sanitizers/asan-shadow-bytes.md +++ b/docs/sanitizers/asan-shadow-bytes.md @@ -19,6 +19,9 @@ One shadow byte describes how many bytes are currently accessible as follows: - 1-7 means one to seven bytes - Negative numbers encode context for the runtime to use for reporting diagnostics. +> [!NOTE] +> By default, entries in the shadow memory are zero-initialized. Therefore, ASan assumes that the memory is _addressable_ by default, i.e. valid to read and write. The shadow bytes will be populated with non-zero values as the program executes and the lifetime of variables and other allocations come to an end. + ### Shadow byte legend Consider this shadow byte legend where all negative numbers are defined: