From: Ivan Krasin Date: Wed, 31 Aug 2016 23:42:27 +0000 (+0000) Subject: Fix the use of unitialized value while reporting double free in ASAN. X-Git-Tag: llvmorg-4.0.0-rc1~10925 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3e82f14181655e6e8ccac1212da888f4d83a367;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/compiler-rt/lib/asan/asan_errors.h b/compiler-rt/lib/asan/asan_errors.h index 637bb44..c8fa4c1 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();