[compiler-rt] [ASan] Fix overflow and last byte handling in __asan_region_is_poisoned (PR #183900)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 22:03:38 PST 2026


================
@@ -19,7 +19,7 @@ int main() {
   // On Windows, %p omits %0x and prints hex characters in upper case,
   // so we use PRIxPTR instead of %p.
   fprintf(stderr, "Expected bad addr: %#" PRIxPTR "\n",
-          reinterpret_cast<uintptr_t>(p + offset));
+          reinterpret_cast<uintptr_t>(p + offset - 1));
----------------
vitalybuka wrote:

is this for alignment? could this be done explicitly?

https://github.com/llvm/llvm-project/pull/183900


More information about the llvm-commits mailing list