mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 19:29:53 +03:00
Note: Change from `cargo:rustc-link-lib=<name>` to `cargo:rustc-link-lib=dylib=<name>` was not required, just to be consistent with the rest of the build.rs. Resolves #15127 (ffi tests are no longer broken on aarch64) Resolves #17030
28 lines
876 B
Diff
28 lines
876 B
Diff
musl does not have execinfo.h, and hence no implementation of
|
|
. backtrace()
|
|
. backtrace_symbols()
|
|
for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1
|
|
|
|
This patch was copied from community/chromium.
|
|
--
|
|
--- a/vendor/v8/v8/src/codegen/external-reference-table.cc
|
|
+++ b/vendor/v8/v8/src/codegen/external-reference-table.cc
|
|
@@ -12,7 +12,9 @@
|
|
|
|
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
|
|
#define SYMBOLIZE_FUNCTION
|
|
+#if defined(__GLIBC__)
|
|
#include <execinfo.h>
|
|
+#endif
|
|
|
|
#include <vector>
|
|
|
|
@@ -114,7 +116,7 @@
|
|
}
|
|
|
|
const char* ExternalReferenceTable::ResolveSymbol(void* address) {
|
|
-#ifdef SYMBOLIZE_FUNCTION
|
|
+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__)
|
|
char** names = backtrace_symbols(&address, 1);
|
|
const char* name = names[0];
|
|
// The array of names is malloc'ed. However, each name string is static
|