Add a thread-local ring buffer of heap allocations
authorKostya Serebryany <kcc@google.com>
Wed, 29 Aug 2018 21:07:07 +0000 (21:07 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 29 Aug 2018 21:07:07 +0000 (21:07 +0000)
commit51e1a83850cd5aac1290822352b3fc1cae0032eb
treeef1666426bee5e928d0bc50a5027ae85472b94b0
parent4821ebf73fac25e756987f79e87fae8a50a46654
Add a thread-local ring buffer of heap allocations

Summary:
We need this in order to properly report heap-use-after-free,
since we don't have a quarantine.

This is a first part of the code, more like a proof of concept.
But I'd like to commit at as is and proceed with refactoring,
adding a ThreadRegistry, and extending the functionality.

Reviewers: eugenis

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D51394

llvm-svn: 340971
compiler-rt/lib/hwasan/hwasan_allocator.cc
compiler-rt/lib/hwasan/hwasan_allocator.h
compiler-rt/lib/hwasan/hwasan_flags.inc
compiler-rt/lib/hwasan/hwasan_report.cc
compiler-rt/lib/hwasan/hwasan_thread.cc
compiler-rt/lib/hwasan/hwasan_thread.h