summaryrefslogtreecommitdiffstats
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
commitf3e82f14181655e6e8ccac1212da888f4d83a367 (patch)
tree64f1398d104959c19220218edd0879a1a6870b9d
parentc1e2b83d099112721b57fc8451c184401b93efaf (diff)
downloadbcm5719-llvm-f3e82f14181655e6e8ccac1212da888f4d83a367.tar.gz
bcm5719-llvm-f3e82f14181655e6e8ccac1212da888f4d83a367.zip
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 llvm-svn: 280325
-rw-r--r--compiler-rt/lib/asan/asan_errors.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_errors.h b/compiler-rt/lib/asan/asan_errors.h
index 637bb44d22a..c8fa4c13e91 100644
--- a/compiler-rt/lib/asan/asan_errors.h
+++ b/compiler-rt/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();
OpenPOWER on IntegriCloud