aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/no-execinfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/chromium/no-execinfo.patch')
-rw-r--r--community/chromium/no-execinfo.patch106
1 files changed, 50 insertions, 56 deletions
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch
index 0f7f3b8283c..4b578976a3e 100644
--- a/community/chromium/no-execinfo.patch
+++ b/community/chromium/no-execinfo.patch
@@ -1,59 +1,10 @@
---- base/debug/stack_trace_posix.cc
-+++ base/debug/stack_trace_posix.cc
-@@ -27,7 +27,7 @@
- #if !defined(USE_SYMBOLIZE)
- #include <cxxabi.h>
- #endif
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- #include <execinfo.h>
- #endif
-
-@@ -88,7 +88,7 @@
- // Note: code in this function is NOT async-signal safe (std::string uses
- // malloc internally).
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- std::string::size_type search_from = 0;
- while (search_from < text->size()) {
- // Look for the start of a mangled symbol, from search_from.
-@@ -135,7 +135,7 @@
- virtual ~BacktraceOutputHandler() = default;
- };
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
- // This should be more than enough to store a 64-bit number in hex:
- // 16 hex digits + 1 for null-terminator.
-@@ -834,7 +834,7 @@
- // NOTE: This code MUST be async-signal safe (it's used by in-process
- // stack dumping signal handler). NO malloc or stdio is allowed here.
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- // Though the backtrace API man page does not list any possible negative
- // return values, we take no chance.
- return base::saturated_cast<size_t>(backtrace(trace, count));
-@@ -847,13 +847,13 @@
- // NOTE: This code MUST be async-signal safe (it's used by in-process
- // stack dumping signal handler). NO malloc or stdio is allowed here.
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- PrintBacktraceOutputHandler handler;
- ProcessBacktrace(trace_, count_, prefix_string, &handler);
- #endif
- }
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
- void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
- const char* prefix_string) const {
- StreamBacktraceOutputHandler handler(os);
---- v8/src/codegen/external-reference-table.cc.orig
-+++ v8/src/codegen/external-reference-table.cc
+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
+--
+--- a/v8/src/codegen/external-reference-table.cc
++++ b/v8/src/codegen/external-reference-table.cc
@@ -11,7 +11,9 @@
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
@@ -73,3 +24,46 @@
char** names = backtrace_symbols(&address, 1);
const char* name = names[0];
// The array of names is malloc'ed. However, each name string is static
+--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
++++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
+@@ -58,7 +58,7 @@
+ #define HAVE_ERRNO_H 1
+
+ /* Define to 1 if you have the <execinfo.h> header file. */
+-#define HAVE_EXECINFO_H 1
++/* #define HAVE_EXECINFO_H 1 */
+
+ /* Define to 1 if you have the <fcntl.h> header file. */
+ #define HAVE_FCNTL_H 1
+--- a/base/debug/stack_trace.cc
++++ b/base/debug/stack_trace.cc
+@@ -251,7 +253,9 @@
+ }
+
+ void StackTrace::OutputToStream(std::ostream* os) const {
++#if defined(__GLIBC__) && !defined(_AIX)
+ OutputToStreamWithPrefix(os, nullptr);
++#endif
+ }
+
+ std::string StackTrace::ToString() const {
+@@ -281,7 +281,7 @@
+ }
+ std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
+ std::stringstream stream;
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ OutputToStreamWithPrefix(&stream, prefix_string);
+ #endif
+ return stream.str();
+--- a/base/debug/stack_trace_unittest.cc
++++ b/base/debug/stack_trace_unittest.cc
+@@ -33,7 +33,7 @@
+ typedef testing::Test StackTraceTest;
+ #endif
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__)
+ // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+ // See https://crbug.com/706728
+