gcc/ * doc/invoke.texi: Document the options. * flag-types.h (enum sanitize_code): Add SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT. * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT. * opts.c: Define new sanitizer options. * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise. (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise. gcc/c/ * c-typeck.c (pointer_diff): Add new argument and instrument pointer subtraction. (build_binary_op): Similar for pointer comparison. gcc/cp/ * typeck.c (pointer_diff): Add new argument and instrument pointer subtraction. (cp_build_binary_op): Create compound expression if doing an instrumentation. gcc/testsuite/ * c-c++-common/asan/pointer-compare-1.c: New test. * c-c++-common/asan/pointer-compare-2.c: New test. * c-c++-common/asan/pointer-subtract-1.c: New test. * c-c++-common/asan/pointer-subtract-2.c: New test. * c-c++-common/asan/pointer-subtract-3.c: New test. * c-c++-common/asan/pointer-subtract-4.c: New test. libsanitizer/ * asan/asan_descriptions.cc: Cherry-pick upstream r319668. * asan/asan_descriptions.h: Likewise. * asan/asan_report.cc: Likewise. * asan/asan_thread.cc: Likewise. * asan/asan_thread.h: Likewise. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r255404
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| asan | Loading commit data... | |
| builtins | Loading commit data... | |
| include | Loading commit data... | |
| interception | Loading commit data... | |
| libbacktrace | Loading commit data... | |
| lsan | Loading commit data... | |
| sanitizer_common | Loading commit data... | |
| tsan | Loading commit data... | |
| ubsan | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| HOWTO_MERGE | Loading commit data... | |
| LICENSE.TXT | Loading commit data... | |
| LOCAL_PATCHES | Loading commit data... | |
| MERGE | Loading commit data... | |
| Makefile.am | Loading commit data... | |
| Makefile.in | Loading commit data... | |
| README.gcc | Loading commit data... | |
| acinclude.m4 | Loading commit data... | |
| aclocal.m4 | Loading commit data... | |
| config.h.in | Loading commit data... | |
| configure | Loading commit data... | |
| configure.ac | Loading commit data... | |
| configure.tgt | Loading commit data... | |
| libsanitizer.spec.in | Loading commit data... | |
| libtool-version | Loading commit data... | |
| merge.sh | Loading commit data... |