Commit Graph

3 Commits

Author SHA1 Message Date
Poul-Henning Kamp
895a7e604d Pull in fix from upstream NetBSD rev. 1.5:
If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will
    return that which poor behavior for the user, so return 0 instead.
    We could document ~0 to be an error, but that would deviate from the
    Linux behavior which is not desirable. Noted by Poul-Henning Kamp

PR:		209842
2020-09-21 16:43:38 +00:00
Conrad Meyer
499fe48de8 Sync up with NetBSD libexecinfo changes 2014-2019
Drop portions that are unlit or redundant with llvm-libunwind: builtin.c,
unwind.h, and unwind_arm_ehabi_stub.c.

This code should now work with -fPIE binaries, should we choose to build any
that way.

When backtrace() array is full, signal an error so the underlying
Itanium-style C++ exception handling library (llvm-libunwind) knows to stop
tracing instead of continuing.  (It should stop on its own when it finishes
unwinding, so this is mostly an extra seatbelt against an infinite loop bug
in the unwinder.)
2019-10-26 06:59:59 +00:00
Ed Maste
287472b39c Import NetBSD libexecinfo 20130822 to contrib 2013-08-23 12:38:51 +00:00