[all-commits] [llvm/llvm-project] eca4b4: [Sanitizer] Fix segfaults during unwinding on SystemZ

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Wed Aug 12 13:25:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eca4b4007d6bafd5fc4be24e2b275ffc22841c63
      https://github.com/llvm/llvm-project/commit/eca4b4007d6bafd5fc4be24e2b275ffc22841c63
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h

  Log Message:
  -----------
  [Sanitizer] Fix segfaults during unwinding on SystemZ

Every now and then SystemZ programs built with ASan crash with

    ERROR: AddressSanitizer: stack-overflow on address 0x040000000000

for no apparent reason. The problem is that
BufferedStackTrace::UnwindFast() is specialized for SystemZ: it takes
register 14 from the frame, however, IsValidFrame() is not
specialized, and does not guarantee that frame[14] is going to be a
valid memory access.

Fix by introducing per-arch kFrameSize and using it in IsValidFrame().

Reviewed By: uweigand

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




More information about the All-commits mailing list