[all-commits] [llvm/llvm-project] 3d2b5b: [libunwind] Factor out sigreturn check condition. NFC

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Thu May 26 09:21:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d2b5b7b87857b0cc4c322cfc145c46c42fe2bbf
      https://github.com/llvm/llvm-project/commit/3d2b5b7b87857b0cc4c322cfc145c46c42fe2bbf
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M libunwind/src/UnwindCursor.hpp

  Log Message:
  -----------
  [libunwind] Factor out sigreturn check condition. NFC

Create a macro for this instead of duplicating the architecture checks
everywhere. (It's a little redundant to use it when we're checking for a
specific architecture, but I'm also applying it there for consistency.)

Reviewed By: rprichard, MaskRay, #libunwind

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


  Commit: 0be0a53df65cb402359c257922d80ab93d86fb40
      https://github.com/llvm/llvm-project/commit/0be0a53df65cb402359c257922d80ab93d86fb40
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M libunwind/src/UnwindCursor.hpp
    A libunwind/test/bad_unwind_info.pass.cpp

  Log Message:
  -----------
  [libunwind] Use process_vm_readv to avoid potential segfaults

We've observed segfaults in libunwind when attempting to check for the
Linux aarch64 sigreturn frame, presumably because of bad unwind info
leading to an incorrect PC that we attempt to read from. Use
process_vm_readv to read the memory safely instead.

The s390x code path should likely follow suit, but I don't have the
hardware to be able to test that, so I didn't modify it here either.

Reviewed By: MaskRay, rprichard, #libunwind

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


Compare: https://github.com/llvm/llvm-project/compare/c8eb83f2d007...0be0a53df65c


More information about the All-commits mailing list