[compiler-rt] [llvm] [ASan] Correctly handle vectorized pointer sub/cmp for `invalid-pointer-pair` (PR #213546)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 2 11:51:19 PDT 2026


================
@@ -0,0 +1,16 @@
+// RUN: %clangxx_asan -O2 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
----------------
thurstond wrote:

Please upload a separate PR with a test (with `// XFAIL: *` and `// REQUIRES: asserts`) that fails, to demonstrate the issue (this fix PR would then remove the XFAIL, proving the fix works).

FWIW without this fix, I could reproduce the crash from https://github.com/llvm/llvm-project/issues/212453 but this test case did not crash for me. AFAICS from `-mllvm -print-before=asan`, this test case is too easy, and the compiler had optimized it into a no-op (https://godbolt.org/z/hhvv35TPr).

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


More information about the llvm-commits mailing list