[PATCH] D59220: [asan] Add options -asan-detect-invalid-pointer-cmp and -asan-detect-invalid-pointer-sub options.
pierre gousseau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 08:12:03 PDT 2019
pgousseau marked an inline comment as done.
pgousseau added a comment.
In D59220#1443749 <https://reviews.llvm.org/D59220#1443749>, @vitalybuka wrote:
> What is exactly going to be checked by -fsanitize=pointer-compare and -fsanitize=pointer-subtract?
> Why this needs to be done in AddressSanitizer?
> Is this going just checheck that pointers are from the same allocation?
-fsanitize=pointer-compare and -fsanitize=pointer-subtract instrument comparison operation (<, <=, >, >=) and '-' operation with pointer operands.
It relies on AddressSanitizer to check the origin of the allocation. gcc also requires -fsanitize=address for -fsanitize=pointer-compare and -fsanitize=pointer-subtract, so I think it is expected to depend on Asan? Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59220/new/
https://reviews.llvm.org/D59220
More information about the llvm-commits
mailing list