[all-commits] [llvm/llvm-project] 542db8: [libunwind] Ensure enough alignment for unw_cursor...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Sat Aug 22 12:56:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 542db87f1ac67087aeb5cf572b1f9744d482da69
      https://github.com/llvm/llvm-project/commit/542db87f1ac67087aeb5cf572b1f9744d482da69
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-08-22 (Sat, 22 Aug 2020)

  Changed paths:
    M libunwind/include/libunwind.h
    M libunwind/src/UnwindCursor.hpp

  Log Message:
  -----------
  [libunwind] Ensure enough alignment for unw_cursor_t for SEH build configurations

When built in SEH mode, UnwindCursor contains a CONTEXT struct,
which is aligned to 16 bytes in most configurations, causing the
whole UnwindCursor object to have 16 byte alignment.

This fixes backtraces using _Unwind_Backtrace on x86_64 mingw,
where an unw_cursor_t allocated on the stack was misaligned before.

This is an ABI break for this struct for this configuration, but very
few callers call libunwind directly (and even fewer directly allocate
an unw_cursor_t anyway).

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




More information about the All-commits mailing list