[clang] [compiler-rt] [compiler-rt:ubsan] Add -fsanitize=unaligned-pointer-subtraction to detect undefined subtraction of two pointers (PR #210635)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 28 14:31:58 PST 2026
vitalybuka wrote:
> > > Can we call it inexact-pointer-subtraction?
> >
> >
> > or even better "pointer-subtraction" to match `-fdefined-pointer-subtraction`
>
> Renamed to pointer-subtraction. One thing to flag: ASan already has -fsanitize=pointer-subtract (pointer pairs from different objects), seems confusing?
A little bit, but -fdefined-pointer-subtraction looks related
https://github.com/llvm/llvm-project/pull/210635
More information about the cfe-commits
mailing list