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.patch58
1 files changed, 19 insertions, 39 deletions
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch
index 0c345e2eff..e3899052dd 100644
--- a/community/chromium/no-execinfo.patch
+++ b/community/chromium/no-execinfo.patch
@@ -1,7 +1,7 @@
---- base/debug/stack_trace_posix.cc.orig 2016-05-08 07:59:51.749087517 +0200
-+++ base/debug/stack_trace_posix.cc 2016-05-08 08:01:24.988950619 +0200
-@@ -24,7 +24,7 @@
- #if defined(__GLIBCXX__)
+--- base/debug/stack_trace_posix.cc.orig
++++ base/debug/stack_trace_posix.cc
+@@ -26,7 +26,7 @@
+ #if !defined(USE_SYMBOLIZE)
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__)
@@ -9,25 +9,25 @@
#include <execinfo.h>
#endif
-@@ -75,7 +75,7 @@ void DemangleSymbols(std::string* text)
+@@ -80,7 +80,7 @@
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
--#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
-+#if defined(__GLIBCXX__) && defined(__GLIBC__)
+-#if !defined(__UCLIBC__)
++#if defined(__GLIBC__)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
-@@ -112,7 +112,7 @@ void DemangleSymbols(std::string* text)
+@@ -116,7 +116,7 @@
+ search_from = mangled_start + 2;
}
}
-
--#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
-+#endif // defined(__GLIBCXX__) && defined(__GLIBC__)
+-#endif // !defined(__UCLIBC__)
++#endif // defined(__GLIBC__)
}
#endif // !defined(USE_SYMBOLIZE)
-@@ -124,7 +124,7 @@ class BacktraceOutputHandler {
+@@ -128,7 +128,7 @@
virtual ~BacktraceOutputHandler() {}
};
@@ -36,7 +36,7 @@
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.
-@@ -201,7 +201,7 @@ void ProcessBacktrace(void *const *trace
+@@ -205,7 +205,7 @@
}
#endif // defined(USE_SYMBOLIZE)
}
@@ -45,16 +45,16 @@
void PrintToStderr(const char* output) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
-@@ -716,7 +716,7 @@ StackTrace::StackTrace() {
- // 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.
+@@ -722,7 +722,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__)
+#if defined(__GLIBC__)
+ count = std::min(arraysize(trace_), count);
+
// Though the backtrace API man page does not list any possible negative
- // return values, we take no chance.
- count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
-@@ -729,13 +729,13 @@ void StackTrace::Print() const {
+@@ -737,13 +737,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.
@@ -81,15 +81,6 @@
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
-@@ -164,7 +164,7 @@
- }
-
- void WTFGetBacktrace(void** stack, int* size) {
--#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
- *size = backtrace(stack, *size);
- #elif OS(WIN)
- // The CaptureStackBackTrace function is available in XP, but it is not
@@ -215,7 +215,7 @@
};
@@ -119,14 +110,3 @@
void* trace[100];
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
char** symbols = backtrace_symbols(trace, size);
---- ./base/debug/stack_trace.cc.orig
-+++ ./base/debug/stack_trace.cc
-@@ -33,7 +33,7 @@
-
- std::string StackTrace::ToString() const {
- std::stringstream stream;
--#if !defined(__UCLIBC__)
-+#if defined(__GLIBC__)
- OutputToStream(&stream);
- #endif
- return stream.str();