Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1f7ab2fec82cca3cf49b4688f5d47ccc5651c095
https://github.com/WebKit/WebKit/commit/1f7ab2fec82cca3cf49b4688f5d47ccc5651c095
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M Source/WTF/wtf/StackTrace.cpp
Log Message:
-----------
[GTK][WPE] StackTraceTest.StackTraceWorks fails when building with clang
https://bugs.webkit.org/show_bug.cgi?id=322041
Reviewed by Adrian Perez de Castro.
The test started failing when the bots switched to clang in 318539@main.
WebKitCompilerFlags.cmake passes "-mllvm -dwarf-linkage-names=Abstract", which
GCC ignores but which makes clang drop the mangled name from the debug info of
regular function definitions. Only the plain name is left, so symbolize() named
the test frame "TestBody" instead of
"TestWebKitAPI::StackTraceTest_StackTraceWorks_Test::TestBody()". Every frame of
a debug build backtrace lost its namespace and class this way. Release builds
were fine because they have no debug info to begin with.
Look the name up in the symbol table first, which always stores the mangled
name, and only ask the debug info when the symbol table has nothing.
Also fix two smaller problems in the same code: the symbol was read
uninitialized when neither lookup found anything, and libbacktrace always calls
the error callback, so passing null for it would crash on the first failed
lookup.
* Source/WTF/wtf/StackTrace.cpp:
(WTF::backtraceErrorCallback):
(WTF::backtraceState):
(WTF::backtraceSyminfoCallback):
(WTF::backtraceFullCallback):
(WTF::symbolize):
Canonical link: https://commits.webkit.org/319400@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications