tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

0003-delete-static-initializer-in-stacktrace.patch (1684B)


      1 TODO: crbug.com/40148384, b/156075691#comment18 - Remove this static initializer upstream
      2 ---
      3 diff --git a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc
      4 index b2792a1f3ada..b94c61233ba3 100644
      5 --- a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc
      6 +++ b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc
      7 @@ -43,17 +43,6 @@ static __thread int recursive = 0;
      8 // glibc implementation itself will trigger malloc the first time it is called.
      9 // As such, we suppress usage of backtrace during this early stage of execution.
     10 static std::atomic<bool> disable_stacktraces(true);  // Disabled until healthy.
     11 -// Waiting until static initializers run seems to be late enough.
     12 -// This file is included into stacktrace.cc so this will only run once.
     13 -ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() {
     14 -  void* unused_stack[1];
     15 -  // Force the first backtrace to happen early to get the one-time shared lib
     16 -  // loading (allocation) out of the way. After the first call it is much safer
     17 -  // to use backtrace from a signal handler if we crash somewhere later.
     18 -  backtrace(unused_stack, 1);
     19 -  disable_stacktraces.store(false, std::memory_order_relaxed);
     20 -  return 0;
     21 -}();
     22 
     23 template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT>
     24 static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
     25 @@ -99,7 +88,7 @@ namespace absl {
     26 ABSL_NAMESPACE_BEGIN
     27 namespace debugging_internal {
     28 bool StackTraceWorksForTest() {
     29 -  return true;
     30 +  return false;
     31 }
     32 }  // namespace debugging_internal
     33 ABSL_NAMESPACE_END