[all-commits] [llvm/llvm-project] f2a436: [libcxxabi] Insert padding in __cxa_exception stru...

Steven Wu via All-commits all-commits at lists.llvm.org
Thu Jan 30 10:04:01 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f2a436058fcbc11291e73badb44e243f61046183
      https://github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243f61046183
  Author: Steven Wu <stevenwu at apple.com>
  Date:   2020-01-30 (Thu, 30 Jan 2020)

  Changed paths:
    M libcxxabi/src/cxa_exception.h

  Log Message:
  -----------
  [libcxxabi] Insert padding in __cxa_exception struct for compatibility

Summary:
Preserve the old ABI for __cxa_exception and __cxa_dependent_exception
on 64 bit platforms or ARM_EHABI platforms.

After r276215, libunwind in llvm-project labels _Unwind_Exception to be
double word aligned. That change implictly adds a padding before
unwindHeader field in __cxa_exception and __cxa_dependent_exception.
Preserve the same negative offsets in those struct by moving the padding
to the beginning of the field.

The assumption here is that if the ABI is not aware of the padding before
unwindHeader and put the referenceCount/primaryException in there, no padding
should exist before unwindHeader.

Reviewers: EricWF, mclow.lists, ldionne, jroelofs, dexonsmith, rjmccall, compnerd, phosek, ahatanak

Reviewed By: rjmccall

Subscribers: hans, smeenai, kristof.beyls, christof, jkorous, ributzka, libcxx-commits

Tags: #libc

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




More information about the All-commits mailing list