diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2015-03-17 16:59:11 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2015-03-17 16:59:11 +0000 |
commit | 5f8ef1c8b8979185c5e4677ed93d18eedfad7aeb (patch) | |
tree | e43d9df5cf9bf57e4c6ae51f9d9104644369dbe9 /lib/sanitizer_common/sanitizer_coverage_libcdep.cc | |
parent | 63c30682e4590f4771dd0adac64f41fa1f9cd3bc (diff) |
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_coverage_libcdep.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_coverage_libcdep.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc index 112e4896c..08f1f9cad 100644 --- a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc @@ -806,6 +806,13 @@ void CoverageUpdateMapping() { } // namespace __sanitizer extern "C" { +SANITIZER_INTERFACE_ATTRIBUTE WEAK +void __sanitizer_cov_hint(uptr g, u64 c, u64 v) { + (void)g; + (void)c; + (void)v; +} + SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov(u32 *guard) { coverage_data.Add(StackTrace::GetPreviousInstructionPc(GET_CALLER_PC()), guard); |