[webkit-changes] [WebKit/WebKit] c120af: Cocoa: Improve backtrace logging for <redacted> sy...

Tim Horton noreply at github.com
Mon Aug 7 15:37:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c120af9a6fcc0a48fc230c1e6980da1cfdb722cc
      https://github.com/WebKit/WebKit/commit/c120af9a6fcc0a48fc230c1e6980da1cfdb722cc
  Author: Tim Horton <thorton at apple.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WTF/wtf/StackTrace.h

  Log Message:
  -----------
  Cocoa: Improve backtrace logging for <redacted> symbols
https://bugs.webkit.org/show_bug.cgi?id=258821
rdar://111700962

Reviewed by Wenson Hsieh.

* Source/WTF/wtf/PlatformHave.h:
* Source/WTF/wtf/StackTrace.h:
(WTF::StackTraceSymbolResolver::forEach const):
Enable backtrace_symbols on Cocoa, since we have it.
If a symbol comes back from dladdr as <redacted>, fall back to the
backtrace_symbols string, which includes:

- the symbol's image's name
- the image's DWARF UUID
- the symbol's address

...the combination of which can be used to make either better guesses about
the stack, or to actually symbolicate offline.

The strcmp check matches what `backtrace_symbols` itself does.

Canonical link: https://commits.webkit.org/266662@main




More information about the webkit-changes mailing list