1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/deno/v8-no-execinfo.patch
Jakub Jirutka afedb462f2 community/deno: upgrade to 2.3.1
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
2025-05-01 11:27:12 +00:00

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