HomeFreeBSD

libthr: Disable stack unwinding on ARM.

Description

libthr: Disable stack unwinding on ARM.

When a thread exits, _Unwind_ForcedUnwind() is used to walk up stack
frames executing pending cleanups pushed by pthread_cleanup_push().
The cleanups are popped by thread_unwind_stop() which is passed as a
callback function to _Unwind_ForcedUnwind().

LLVM's libunwind uses a different function type for the callback on
32-bit ARM relative to all other platforms. The previous unwind.h
header (as well as the unwind.h from libcxxrt) use the non-ARM type on
all platforms, so this has likely been broken on 32-bit arm since it
switched to using LLVM's libunwind.

For now, just disable stack unwinding on 32-bit arm to unbreak the
build until a proper fix is tested.

(cherry picked from commit bbf4df1722060fb78939419476fb624114fb303d)

Details

Provenance
jhbAuthored on Feb 10 2022, 8:47 PM
dimCommitted on Feb 20 2022, 12:29 PM
Parents
rGb2127b6f1ae2: Install unwind.h into /usr/include
Branches
Unknown
Tags
Unknown