HomeFreeBSD

libunwind: make __{de,}register_frame compatible with libgcc API

Description

libunwind: make __{de,}register_frame compatible with libgcc API

The libgcc register_frame and deregister_frame functions take a
pointer to a set of FDE/CIEs, terminated by an entry where length is 0.

In Apple's libunwind implementation the pointer is taken to be to a
single FDE. I suspect this was just an Apple bug, compensated by Apple-
specific code in LLVM.

See lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp and
http://lists.llvm.org/pipermail/llvm-dev/2013-April/061737.html
for more detail.

This change is based on the LLVM RTDyldMemoryManager.cpp. It should
later be changed to be alignment-safe.

Reported by: dim
Reviewed by: dim
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8869

Details

Provenance
emasteAuthored on
Reviewer
dim
Differential Revision
D8869: libunwind: make __{de,}register_frame compatible with libgcc API
Parents
rS310364: MFC r310205:
Branches
Unknown
Tags
Unknown