[PATCH] D69045: libhwasan interceptor ABI intercept longjmp/setjmp

Matthew Malcomson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 08:36:46 PDT 2019


mmalcomson created this revision.
mmalcomson added reviewers: Sanitizers, eugenis, kcc, pcc.
mmalcomson added a project: Sanitizers.
Herald added subscribers: llvm-commits, kristof.beyls, mgorny.
Herald added a project: LLVM.

The hwasan interceptor ABI doesn't have interceptors for longjmp and setjmp.
This patch introduces them.

It seems a transitive include (through `hwasan_interface_internal.h` including
the system header `link.h`) means that the setjmp data structures for the target
system are already included during compilation time.  Despite this not following
the comment at the top of `hwasan_interceptors.cpp` this is being left for now.

Tested on both GCC and clang using an AArch64 virtual machine.

I haven't yet written a test for this since I don't understand the clang
testsuite format -- I will do this, but am putting the current patch up for
discussion so I can get some feedback while working on that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69045

Files:
  compiler-rt/lib/hwasan/CMakeLists.txt
  compiler-rt/lib/hwasan/hwasan_interceptors.cpp
  compiler-rt/lib/hwasan/hwasan_setjmp.S

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69045.225233.patch
Type: text/x-patch
Size: 5794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191016/2445e6f9/attachment-0001.bin>


More information about the llvm-commits mailing list