[PATCH] D52249: [hwasan] Record and display stack history in stack-based reports.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 14:37:55 PDT 2018


eugenis created this revision.
eugenis added a reviewer: kcc.
Herald added subscribers: jfb, hiraditya, mgorny, kubamracek, srhines.

Display a list of recent stack frames (not a stack trace!) when
tag-mismatch is detected on a stack address.

The implementation uses alignment tricks to get both the address of
the history buffer, and the base address of the shadow with a single
8-byte load. See the comment in hwasan_thread_list.h for more
details.

Developed in collaboration with Kostya Serebryany.


https://reviews.llvm.org/D52249

Files:
  compiler-rt/lib/hwasan/CMakeLists.txt
  compiler-rt/lib/hwasan/hwasan.cc
  compiler-rt/lib/hwasan/hwasan.h
  compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cc
  compiler-rt/lib/hwasan/hwasan_flags.inc
  compiler-rt/lib/hwasan/hwasan_interceptors.cc
  compiler-rt/lib/hwasan/hwasan_linux.cc
  compiler-rt/lib/hwasan/hwasan_report.cc
  compiler-rt/lib/hwasan/hwasan_thread.cc
  compiler-rt/lib/hwasan/hwasan_thread.h
  compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
  compiler-rt/lib/sanitizer_common/tests/sanitizer_ring_buffer_test.cc
  compiler-rt/test/hwasan/TestCases/deep-recursion.c
  compiler-rt/test/hwasan/TestCases/rich-stack.c
  llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52249.166038.patch
Type: text/x-patch
Size: 34952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180918/06a76991/attachment.bin>


More information about the llvm-commits mailing list