Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libexecinfo make the backtrace()'s tracer() return _URC_...
details: https://anonhg.NetBSD.org/src/rev/72ba5371d6bd
branches: trunk
changeset: 838771:72ba5371d6bd
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Jan 30 22:46:49 2019 +0000
description:
make the backtrace()'s tracer() return _URC_FOREIGN_EXCEPTION_CAUGHT
when the array is full. it won't be able to do any more work if so,
and avoids infinite loops in unwinding as seen on arm64.
XXX: lack of signal support here means that backtrace() is useless
XXX: from a signal handler, such as attempting to display the stack
XXX: when handling a SIGSEGV.
diffstat:
lib/libexecinfo/unwind.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r ca3f84d66652 -r 72ba5371d6bd lib/libexecinfo/unwind.c
--- a/lib/libexecinfo/unwind.c Wed Jan 30 20:20:36 2019 +0000
+++ b/lib/libexecinfo/unwind.c Wed Jan 30 22:46:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unwind.c,v 1.2 2014/03/24 21:26:01 joerg Exp $ */
+/* $NetBSD: unwind.c,v 1.3 2019/01/30 22:46:49 mrg Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -52,6 +52,8 @@
}
if (t->n < t->len)
t->arr[t->n++] = (void *)_Unwind_GetIP(ctx);
+ else
+ return _URC_FOREIGN_EXCEPTION_CAUGHT;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index