This series enables ASan on alpha*-*-linux*. It depends on a libsanitizer
sync from llvm-project that picks up Alpha support. I requested that sync
in August:

  
https://inbox.sourceware.org/gcc/caedq38hqixuk65nd6r0ob_yavgwn_nkic58xa5w0hkv5ecy...@mail.gmail.com/

and Jakub's merge now appears to be in progress:

  https://inbox.sourceware.org/gcc-patches/avRO5kYgF9dcYS7x@tucnak/

The upstream commits needed are:

  992ee5934c11 Add support for Alpha to libsanitizer
  b9d0703f7d6b [sanitizer_common] Disable the fast unwinder on Alpha Linux
  0ccb181514cd [compiler-rt] Use asm .set only for Hexagon

plus Alpha fixes that are not upstream yet (the 1T shadow offset, syscall
constraints and sign extension, rt_sigaction, and the TCB size). The
series is based on a local stand-in commit for the sync, so the
base-commit below is not in the GCC tree.

Patch 1 fixes generic code: when an Alpha peephole2 rewrites a call,
peep2_attempt drops its nothrow REG_EH_REGION note, which causes an ICE
with the downward-growing frame that ASan needs.

Tested with a cross build to alpha-unknown-linux-gnu, running asan.exp
under qemu-alpha: gcc 2261 PASS, g++ 2198 PASS. The 9 FAILs in each are
clone-test-1 and rlimit-mmap-test-1, which fail under qemu-user.

Signed-off-by: Matt Turner <[email protected]>
---
Matt Turner (4):
      recog: Copy REG_EH_REGION notes to new calls in peep2_attempt
      alpha: Keep the ASan $LASANPC label out of small data
      alpha: Support AddressSanitizer on Linux
      libsanitizer: Enable on alpha*-*-linux*

 gcc/config/alpha/alpha.cc  | 16 ++++++++++++++++
 gcc/config/alpha/alpha.h   |  8 +++++---
 gcc/config/alpha/linux.h   |  9 +++++++++
 gcc/recog.cc               |  6 ++++++
 libsanitizer/configure.tgt |  2 ++
 5 files changed, 38 insertions(+), 3 deletions(-)
---
base-commit: 92644cbe7791850106ba0818a6d68bab0e1cccf5
change-id: 20261113-alpha-sanitizer-support-2746aa6abb7e

Best regards,
--  
Matt Turner <[email protected]>

Reply via email to