summaryrefslogtreecommitdiff
path: root/lib/asan/asan_errors.h
diff options
context:
space:
mode:
authorIvan Krasin <krasin@chromium.org>2016-08-31 23:42:27 +0000
committerIvan Krasin <krasin@chromium.org>2016-08-31 23:42:27 +0000
commit140713980f2747ebe8e8df5011b872a025b94094 (patch)
treefb72e2492d15829f8533c1d3bb7e27c33403362e /lib/asan/asan_errors.h
parent7f04ab5a7c59f8a626711d7bb4e5b985d68fea26 (diff)
Fix the use of unitialized value while reporting double free in ASAN.
Summary: This is a follow up to https://reviews.llvm.org/rL280201 where this issue was introduced. ASAN tests failed: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/25219/steps/run%20asan%20tests/logs/stdio Reviewers: filcab Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D24109 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_errors.h')
-rw-r--r--lib/asan/asan_errors.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asan/asan_errors.h b/lib/asan/asan_errors.h
index 637bb44d2..c8fa4c13e 100644
--- a/lib/asan/asan_errors.h
+++ b/lib/asan/asan_errors.h
@@ -56,6 +56,7 @@ struct ErrorDoubleFree : ErrorBase {
: tid(tid_), second_free_stack(stack) {
CHECK_GT(second_free_stack->size, 0);
GetHeapAddressInformation(addr, 1, &addr_description);
+ scariness.Clear();
scariness.Scare(42, "double-free");
}
void Print();