summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-04-10 15:54:10 +1200
committerKarolin Seeger <kseeger@samba.org>2018-06-04 09:54:23 +0200
commit8f9be615515622738fbc7175a44902679f2187d7 (patch)
tree46ef0f43836a326c430eb0e06c285765a63973db /source3/lib
parente322613d518953dfe725a8d6c0c35c8cd73c8dbb (diff)
downloadsamba-8f9be615515622738fbc7175a44902679f2187d7.tar.gz
s3-lib: Remove support for libexc for IRIX backtraces
IRIX is long dead, and this code needs become_root() which is not in the top level code. Additionally, the check for libexc never made it into waf, so this has been dead code since Samba 4.1. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454 (cherry picked from commit 85dc9ee14023a8fb84b5c74555d43008bb6bb0c0)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index ae9fe71c974..98c47b3df9f 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -852,10 +852,6 @@ void smb_panic_s3(const char *why)
#include <execinfo.h>
#endif
-#ifdef HAVE_LIBEXC_H
-#include <libexc.h>
-#endif
-
void log_stack_trace(void)
{
#ifdef HAVE_LIBUNWIND
@@ -934,44 +930,6 @@ libunwind_failed:
/* Leak the backtrace_strings, rather than risk what free() might do */
}
-#elif HAVE_LIBEXC
-
- /* The IRIX libexc library provides an API for unwinding the stack. See
- * libexc(3) for details. Apparantly trace_back_stack leaks memory, but
- * since we are about to abort anyway, it hardly matters.
- */
-
-#define NAMESIZE 32 /* Arbitrary */
-
- __uint64_t addrs[BACKTRACE_STACK_SIZE];
- char * names[BACKTRACE_STACK_SIZE];
- char namebuf[BACKTRACE_STACK_SIZE * NAMESIZE];
-
- int i;
- int levels;
-
- ZERO_ARRAY(addrs);
- ZERO_ARRAY(names);
- ZERO_ARRAY(namebuf);
-
- /* We need to be root so we can open our /proc entry to walk
- * our stack. It also helps when we want to dump core.
- */
- become_root();
-
- for (i = 0; i < BACKTRACE_STACK_SIZE; i++) {
- names[i] = namebuf + (i * NAMESIZE);
- }
-
- levels = trace_back_stack(0, addrs, names,
- BACKTRACE_STACK_SIZE, NAMESIZE - 1);
-
- DEBUG(0, ("BACKTRACE: %d stack frames:\n", levels));
- for (i = 0; i < levels; i++) {
- DEBUGADD(0, (" #%d 0x%llx %s\n", i, addrs[i], names[i]));
- }
-#undef NAMESIZE
-
#else
DEBUG(0, ("unable to produce a stack trace on this platform\n"));
#endif