diff options
Diffstat (limited to 'community/chromium/no-execinfo.patch')
-rw-r--r-- | community/chromium/no-execinfo.patch | 86 |
1 files changed, 42 insertions, 44 deletions
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch index 05d96c1bae..231cf33cff 100644 --- a/community/chromium/no-execinfo.patch +++ b/community/chromium/no-execinfo.patch @@ -1,97 +1,95 @@ ---- base/debug/stack_trace_posix.cc.orig +diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc +index 7696be8..20ebe67 100644 +--- a/base/debug/stack_trace_posix.cc +++ base/debug/stack_trace_posix.cc @@ -26,7 +26,7 @@ #if !defined(USE_SYMBOLIZE) #include <cxxabi.h> #endif --#if !defined(__UCLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) #include <execinfo.h> #endif -@@ -80,7 +80,7 @@ +@@ -82,7 +82,7 @@ void DemangleSymbols(std::string* text) { // Note: code in this function is NOT async-signal safe (std::string uses // malloc internally). --#if !defined(__UCLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) - std::string::size_type search_from = 0; while (search_from < text->size()) { -@@ -116,7 +116,7 @@ - search_from = mangled_start + 2; - } - } --#endif // !defined(__UCLIBC__) -+#endif // defined(__GLIBC__) - } - #endif // !defined(USE_SYMBOLIZE) - -@@ -128,7 +128,7 @@ + // Look for the start of a mangled symbol, from search_from. +@@ -129,7 +129,7 @@ class BacktraceOutputHandler { virtual ~BacktraceOutputHandler() {} }; --#if !defined(__UCLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) 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. -@@ -205,7 +205,7 @@ - } - #endif // defined(USE_SYMBOLIZE) +@@ -705,6 +705,10 @@ class SandboxSymbolizeHelper { + } // namespace + + bool EnableInProcessStackDumping() { ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++// let system handler deal with the dumps ++ return true; ++#else + #if defined(USE_SYMBOLIZE) + SandboxSymbolizeHelper::GetInstance(); + #endif // USE_SYMBOLIZE +@@ -738,6 +742,7 @@ bool EnableInProcessStackDumping() { + #endif // !defined(OS_LINUX) + + return success; ++#endif } --#endif // !defined(__UCLIBC__) -+#endif // defined(__GLIBC__) - void PrintToStderr(const char* output) { - // NOTE: This code MUST be async-signal safe (it's used by in-process -@@ -722,7 +722,7 @@ + void SetStackDumpFirstChanceCallback(bool (*handler)(int, void*, void*)) { +@@ -749,7 +754,7 @@ StackTrace::StackTrace(size_t count) { // 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(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) count = std::min(arraysize(trace_), count); // Though the backtrace API man page does not list any possible negative -@@ -737,13 +737,13 @@ +@@ -764,13 +769,13 @@ void StackTrace::Print() const { // 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(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) PrintBacktraceOutputHandler handler; ProcessBacktrace(trace_, count_, &handler); #endif } --#if !defined(__UCLIBC__) +-#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) void StackTrace::OutputToStream(std::ostream* os) const { StreamBacktraceOutputHandler handler(os); ProcessBacktrace(trace_, count_, &handler); ---- third_party/WebKit/Source/wtf/Assertions.cpp.orig 2016-12-02 00:02:32.000000000 +0100 +diff --git a/third_party/WebKit/Source/platform/wtf/Assertions.cpp b/third_party/WebKit/Source/platform/wtf/Assertions.cpp +index 9bdece7..0c76188 100644 +--- a/third_party/WebKit/Source/platform/wtf/Assertions.cpp +++ third_party/WebKit/Source/platform/wtf/Assertions.cpp -@@ -60,7 +60,7 @@ +@@ -56,7 +56,7 @@ #include <windows.h> #endif --#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__)) -+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__)) +-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__)) ++#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__)) #include <cxxabi.h> #include <dlfcn.h> #include <execinfo.h> -@@ -215,7 +215,7 @@ - }; - - FrameToNameScope::FrameToNameScope(void* addr) : m_name(0), m_cxaDemangled(0) { --#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__)) -+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__)) - Dl_info info; - if (!dladdr(addr, &info) || !info.dli_sname) - return; ---- third_party/webrtc/base/checks.cc.orig 2016-05-08 08:03:04.398461275 +0200 -+++ third_party/webrtc/base/checks.cc 2016-05-08 08:03:24.254431362 +0200 +diff --git a/third_party/webrtc/rtc_base/checks.cc b/third_party/webrtc/rtc_base/checks.cc +index 533240f..08b3f3e 100644 +--- a/third_party/webrtc/rtc_base/checks.cc ++++ third_party/webrtc/rtc_base/checks.cc @@ -16,7 +16,7 @@ #include <cstdio> #include <cstdlib> @@ -101,7 +99,7 @@ #include <cxxabi.h> #include <execinfo.h> #endif -@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) +@@ -60,7 +60,7 @@ void PrintError(const char* format, ...) { // to get usable symbols on Linux. This is copied from V8. Chromium has a more // advanced stace trace system; also more difficult to copy. void DumpBacktrace() { |