[hwasan] add stack frame descriptions.
authorKostya Serebryany <kcc@google.com>
Tue, 23 Oct 2018 00:50:40 +0000 (00:50 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 23 Oct 2018 00:50:40 +0000 (00:50 +0000)
commitaf95597c3c9ecf18a9e66e6a403daf6dc3dd597f
tree788c11dd2645ffa523611aa3d77d0788bd9cc170
parent9d7de097d4f89912e01032bd619b8a8e97cb9376
[hwasan] add stack frame descriptions.

Summary:
At compile-time, create an array of {PC,HumanReadableStackFrameDescription}
for every function that has an instrumented frame, and pass this array
to the run-time at the module-init time.
Similar to how we handle pc-table in SanitizerCoverage.
The run-time is dummy, will add the actual logic in later commits.

Reviewers: morehouse, eugenis

Reviewed By: eugenis

Subscribers: srhines, llvm-commits, kubamracek

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

llvm-svn: 344985
compiler-rt/lib/hwasan/hwasan.cc
compiler-rt/lib/hwasan/hwasan_interface_internal.h
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/test/Instrumentation/HWAddressSanitizer/basic.ll
llvm/test/Instrumentation/HWAddressSanitizer/frame-descriptor.ll [new file with mode: 0644]
llvm/test/Instrumentation/HWAddressSanitizer/with-calls.ll