Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Support using libunwind for backtrack #22215

Merged
merged 1 commit into from Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion numpy/core/setup_common.py
Expand Up @@ -141,7 +141,9 @@ def set_sig(sig):
"immintrin.h", # AVX
"features.h", # for glibc version linux
"xlocale.h", # see GH#8367
"dlfcn.h", # dladdr
"dlfcn.h", # dladdr
"execinfo.h", # backtrace
"libunwind.h", # backtrace for LLVM/Clang using libunwind
"sys/mman.h", #madvise
]

Expand Down
5 changes: 5 additions & 0 deletions numpy/core/src/multiarray/temp_elide.c
Expand Up @@ -82,7 +82,12 @@
#define NPY_MIN_ELIDE_BYTES (32)
#endif
#include <dlfcn.h>

#if defined HAVE_EXECINFO_H
#include <execinfo.h>
#elif defined HAVE_LIBUNWIND_H
#include <libunwind.h>
#endif

/*
* linear search pointer in table
Expand Down
4 changes: 4 additions & 0 deletions numpy/linalg/umath_linalg.cpp
Expand Up @@ -50,7 +50,11 @@ using dispatch_scalar = typename std::conditional<std::is_scalar<typ>::value, sc
} while (0)

#if 0
#if defined HAVE_EXECINFO_H
#include <execinfo.h>
#elif defined HAVE_LIBUNWIND_H
#include <libunwind.h>
#endif
void
dbg_stack_trace()
{
Expand Down