[PATCH] D44777: Mmap interceptor providing mprotect support
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 23:55:14 PDT 2018
vitalybuka added inline comments.
================
Comment at: test/sanitizer_common/TestCases/Linux/mmap_write_exec.cpp:15
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
- // CHECK: WARNING: {{.*}}Sanitizer: writable-executable page usage
+ // CHECK-DISABLED-NOT: WARNING: {{.*}}Sanitizer: writable-executable page usage
+ // CHECK: #0 {{.* ?}}mmap {{.*}}mmap_write_exec.cpp:[[@LINE-3]]
----------------
For check-not I'd use simple rule, e.g. just "-NOT: Sanitizer"
With complex rule there is a check that it can get always true if we change format.
================
Comment at: test/sanitizer_common/TestCases/Linux/mmap_write_exec.cpp:20
+ (void)mprotect(q, 64, PROT_WRITE | PROT_EXEC);
+ // CHECK-DISABLED-NOT: WARNING: {{.*}}Sanitizer: writable-executable page usage
+ // CHECK: #0 {{.* ?}}__interceptor_mprotect {{.*}}mmap_write_exec.cpp:[[@LINE-2]]
----------------
there is no point in checking "-NOT:" twice here
one above covers everything
https://reviews.llvm.org/D44777
More information about the llvm-commits
mailing list