[PATCH] D63469: hwasan: Teach the runtime to identify the local variable being accessed in UAR reports.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 20:38:59 PDT 2019


pcc created this revision.
pcc added a reviewer: eugenis.
Herald added subscribers: Sanitizers, kubamracek.
Herald added projects: Sanitizers, LLVM.
pcc added a child revision: D63470: hwasan: Remove the old frame descriptor mechanism..

Each function's PC is recorded in the ring buffer. From there we can access
the function's local variables and reconstruct the tag of each one with the
help of the information printed by llvm-symbolizer's new FRAME command. We
can then find the variable that was likely being accessed by matching the
pointer's tag against the reconstructed tag.

Depends on D63300 <https://reviews.llvm.org/D63300>

Depends on D63468 <https://reviews.llvm.org/D63468>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63469

Files:
  compiler-rt/lib/hwasan/hwasan.cpp
  compiler-rt/lib/hwasan/hwasan.h
  compiler-rt/lib/hwasan/hwasan_report.cpp
  compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
  compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
  compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h
  compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h
  compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc
  compiler-rt/test/hwasan/TestCases/stack-uar.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63469.205238.patch
Type: text/x-patch
Size: 16109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190618/29a34424/attachment.bin>


More information about the llvm-commits mailing list