HomeFreeBSD

Add an ugly hack to libgcc's unwind code, to make it behave properly at
rS245272Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang. Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function. This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by: stefanf
MFC after: 3 days

Details

Provenance
dimAuthored on
Parents
rS245271: Add xargs to the set of install tools when zoneinfo is not disabled.
Branches
Unknown
Tags
Unknown

Event Timeline