[PATCH] D59221: [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract.

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 13:48:27 PDT 2019


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Seems like harmless plumbing. Given that the LLVM side of this is accepted, this lgtm.



================
Comment at: test/Driver/fsanitize.c:837
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-compare -fno-sanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-CMP
+// CHECK-POINTER-ALL: "-cc1{{.*}}-fsanitize={{.*}}pointer-compare,pointer-subtract{{.*}}" {{.*}} "-mllvm" "-asan-detect-invalid-pointer-cmp" "-mllvm" "-asan-detect-invalid-pointer-sub"
+// CHECK-POINTER-CMP-NEEDS-ADDRESS: error: invalid argument '-fsanitize=pointer-compare' only allowed with '-fsanitize=address'
----------------
Should some of these be {{[^"}*}} instead of {{.*}} so that the match isn't accidentally across different flags?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59221/new/

https://reviews.llvm.org/D59221





More information about the cfe-commits mailing list