[PATCH] D56470: [NewPM] Second attempt at porting ASan
Leonard Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 12:45:19 PST 2019
leonardchan added a comment.
Updated. Before submitting, @chandlerc would you mind taking one last look at this to make sure everything is in order? I wouldn't want to accidentally cause another ASan related timeout.
================
Comment at: clang/test/CodeGen/asan-new-pm.ll:22-25
+; CHECK:; <label>:11: ; preds = %6
+; CHECK: call void @__asan_report_load4(i64 %0)
+; CHECK: call void asm sideeffect "", ""()
+; CHECK: unreachable
----------------
fedor.sergeev wrote:
> If I get it right, the primary goal of this test is to check that address sanitizer actually kicks in for the new pass manager with -fexperimental-new-pass-manager -fsanitize=address.
>
> Then the only check that needs to be done here is the presence of __asan instrumentation function calls and thats all.
> No need to check exact sequence of instructions in the function, which might be subject to change depending on how -O1 is packed with optimizations.
>
> And then perhaps you can even skip -O1.
Yup, this is just for checking if the sanitizer works with those arguments. Based off where the sanitizer passes are added though, it seems that the `-O1` is necessary since the sanitizers cannot get added if there is no optimization. On top of this, I think only a few __asan functions are declared since I think having `-O1` removes unused functions.
Nevertheless, added the checks to make sure the appropriate __asan functions get declared.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56470/new/
https://reviews.llvm.org/D56470
More information about the llvm-commits
mailing list