CVSROOT:        /cvs
Module name:    src
Changes by:     gkoeh...@cvs.openbsd.org        2025/08/24 22:24:05

Modified files:
        gnu/llvm/libunwind/src: DwarfInstructions.hpp 

Log message:
Stop the xonly crash in libunwind on powerpc64

The powerpc64 unwinder was trying to read the instruction at the
return address.  This crashed, because you can't read from
execute-only memory.

This has probably been broken since January 2023 (before OpenBSD 7.3),
when powerpc64 became xonly.  This broke anything that got a
backtrace(3) from libexecinfo or threw a C++ exception with libc++abi.
editors/emacs,no_x11 crashed in libexecinfo.  devel/gdb crashed in
libc++abi.  If you tried to examine the core dupm in gdb, then gdb
crashed again.

The unwinder is asking whether the return address has an instruction
to restore the TOC register.  Instead of crashing, call dladdr(3)
twice to find the shared objects.  Assume that each object has only
one TOC.  Restore TOC if returning to a different object.

ok kettenis@

Reply via email to