[compiler-rt] r280325 - Fix the use of unitialized value while reporting double free in ASAN.

Ivan Krasin via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 16:42:27 PDT 2016


Author: krasin
Date: Wed Aug 31 18:42:27 2016
New Revision: 280325

URL: http://llvm.org/viewvc/llvm-project?rev=280325&view=rev
Log:
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

Modified:
    compiler-rt/trunk/lib/asan/asan_errors.h

Modified: compiler-rt/trunk/lib/asan/asan_errors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_errors.h?rev=280325&r1=280324&r2=280325&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_errors.h (original)
+++ compiler-rt/trunk/lib/asan/asan_errors.h Wed Aug 31 18:42:27 2016
@@ -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();




More information about the llvm-commits mailing list