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
This commit is contained in:
Ivan Krasin 2016-08-31 23:42:27 +00:00
parent c1e2b83d09
commit f3e82f1418
1 changed files with 1 additions and 0 deletions

View File

@ -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();