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 #endif -#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) #include #endif @@ -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__) && !defined(_AIX) +#if defined(__GLIBC__) std::string::size_type search_from = 0; while (search_from < text->size()) { // Look for the start of a mangled symbol, from search_from. @@ -129,7 +129,7 @@ class BacktraceOutputHandler { virtual ~BacktraceOutputHandler() {} }; -#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. @@ -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 } 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__) && !defined(_AIX) +#if defined(__GLIBC__) count = std::min(arraysize(trace_), count); // Though the backtrace API man page does not list any possible negative @@ -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__) && !defined(_AIX) +#if defined(__GLIBC__) PrintBacktraceOutputHandler handler; ProcessBacktrace(trace_, count_, &handler); #endif } -#if !defined(__UCLIBC__) && !defined(_AIX) +#if defined(__GLIBC__) void StackTrace::OutputToStream(std::ostream* os) const { StreamBacktraceOutputHandler handler(os); ProcessBacktrace(trace_, count_, &handler); diff --git a/third_party/WebKit/Source/platform/wtf/Assertions.cpp b/third_party/WebKit/Source/platform/wtf/Assertions.cpp index 9bdece7..0c76188 100644 --- ./third_party/blink/renderer/platform/wtf/assertions.cc +++ ./third_party/blink/renderer/platform/wtf/assertions.cc @@ -56,7 +56,7 @@ #include #endif -#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__)) +#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__)) #include #include #include