[compiler-rt] [HWASan] [NFC] Align comment to implementation (PR #86362)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 16:52:25 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Florian Mayer (fmayer)
<details>
<summary>Changes</summary>
We consider `shift` between 1 and 7 (exclusive) for `(1 << shift)`, which is equivalent to `2 ** shift`, which means N is [1, 7), not [0, 8).
---
Full diff: https://github.com/llvm/llvm-project/pull/86362.diff
1 Files Affected:
- (modified) compiler-rt/lib/hwasan/hwasan_thread_list.h (+1-1)
``````````diff
diff --git a/compiler-rt/lib/hwasan/hwasan_thread_list.h b/compiler-rt/lib/hwasan/hwasan_thread_list.h
index d0eebd1b373a37..4251d7b67b4930 100644
--- a/compiler-rt/lib/hwasan/hwasan_thread_list.h
+++ b/compiler-rt/lib/hwasan/hwasan_thread_list.h
@@ -18,7 +18,7 @@
// * Start of the shadow memory region is aligned to 2**kShadowBaseAlignment.
// * All stack ring buffers are located within (2**kShadowBaseAlignment)
// sized region below and adjacent to the shadow region.
-// * Each ring buffer has a size of (2**N)*4096 where N is in [0, 8), and is
+// * Each ring buffer has a size of (2**N)*4096 where N is in [1, 7), and is
// aligned to twice its size. The value of N can be different for each buffer.
//
// These constrains guarantee that, given an address A of any element of the
``````````
</details>
https://github.com/llvm/llvm-project/pull/86362
More information about the llvm-commits
mailing list