GeezerVison is showing github.com — BUG: Support using libunwind for backtrack · numpy/numpy@1d4cb4b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: numpy/core/setup_common.py +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -142,7 +142,9 @@ def set_sig(sig): |
142 | 142 | "immintrin.h", # AVX |
143 | 143 | "features.h", # for glibc version linux |
144 | 144 | "xlocale.h", # see GH#8367 |
145 | | - "dlfcn.h", # dladdr |
| 145 | + "dlfcn.h", # dladdr |
| 146 | + "execinfo.h", # backtrace |
| 147 | + "libunwind.h", # backtrace for LLVM/Clang using libunwind |
146 | 148 | "sys/mman.h", #madvise |
147 | 149 | ] |
148 | 150 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: numpy/core/src/multiarray/temp_elide.c +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
82 | 82 | #define NPY_MIN_ELIDE_BYTES (32) |
83 | 83 | #endif |
84 | 84 | #include <dlfcn.h> |
| 85 | + |
| 86 | +#if defined HAVE_EXECINFO_H |
85 | 87 | #include <execinfo.h> |
| 88 | +#elif defined HAVE_LIBUNWIND_H |
| 89 | +#include <libunwind.h> |
| 90 | +#endif |
86 | 91 |
|
87 | 92 | /* |
88 | 93 | * linear search pointer in table |
|
Collapse file
Copy file name to clipboardExpand all lines: numpy/linalg/umath_linalg.cpp +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -50,7 +50,11 @@ using dispatch_scalar = typename std::conditional<std::is_scalar<typ>::value, sc |
50 | 50 | } while (0) |
51 | 51 |
|
52 | 52 | #if 0 |
| 53 | +#if defined HAVE_EXECINFO_H |
53 | 54 | #include <execinfo.h> |
| 55 | +#elif defined HAVE_LIBUNWIND_H |
| 56 | +#include <libunwind.h> |
| 57 | +#endif |
54 | 58 | void |
55 | 59 | dbg_stack_trace() |
56 | 60 | { |
|