Bug 279985
Summary: | Build fails on ppc64le due to MUST_TAIL_CALL when tail call is not possible | ||
---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply, mcatanzaro, webkit-bug-importer |
Priority: | P2 | ||
Version: | Other | ||
Hardware: | PC | ||
OS: | Linux |
Michael Catanzaro
We get this Clang crash when trying to build WebKitGTK 2.45.92 on ppc64le:
/usr/bin/clang++ -DBUILDING_GTK__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"
WebKitGTK-6.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DPAS_BMALLOC=1 -DSKCMS_DISABLE_HSW -DSKCMS_DISABLE_SKX -DSKIA_IMPLEMENTATION=1 -DSK_ASSUME_GL=0 -DSK_ASSUME_GL_ES=1 -DSK_ASSUME_WEBG
L=0 -DSK_CODEC_DECODES_PNG -DSK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE -DSK_DISABLE_LEGACY_IMAGE_READBUFFER -DSK_DISABLE_LEGACY_INIT_DECODERS -DSK_DISABLE_LEGACY_PNG_WRITEBUFFER -DSK_DISABL
E_TRACING -DSK_DISABLE_WEBGL_INTERFACE -DSK_ENABLE_PRECOMPILE -DSK_GAMMA_APPLY_TO_A8 -DSK_GANESH -DSK_GL -DSK_R32_SHIFT=16 -DSK_RELEASE -DSK_TRIVIAL_ABI=[[clang::trivial_abi]] -DSK_TYPEFACE_
FACTORY_FREETYPE -I/builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/Source/ThirdParty/skia -isystem /usr/include/freetype2 -fdiagnostics-color=always -fcolor-diagnostics -Wext
ra -Wall -pipe -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-parentheses-equality -Qunused-arguments -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wc
ast-align -Wno-tautological-compare -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --confi
g=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -fno-strict-aliasing -fno-exc
eptions -fno-rtti -fcoroutines -ffunction-sections -fdata-sections -DNDEBUG -std=c++23 -fPIC -fvisibility=hidden -ffp-contract=off -fstrict-aliasing -Wno-attributes -Wno-cast-align -Wno-depr
ecated -Wno-psabi -Wno-undef -Wno-uninitialized -Wno-unused-parameter -pthread -DWITH_GZFILEOP -MD -MT Source/ThirdParty/skia/CMakeFiles/Skia.dir/src/core/SkOpts.cpp.o -MF Source/ThirdParty/
skia/CMakeFiles/Skia.dir/src/core/SkOpts.cpp.o.d -o Source/ThirdParty/skia/CMakeFiles/Skia.dir/src/core/SkOpts.cpp.o -c /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/Source
/ThirdParty/skia/src/core/SkOpts.cpp
fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Turns out Skia's use of clang::musttail is not supported by Clang and needs to be removed in Skia. Relevant links:
https://github.com/llvm/llvm-project/pull/93267 (fix the crash, emit a proper error message instead)
https://github.com/llvm/llvm-project/issues/98859 (unresolved issue report to support tail calls in this situation)
https://github.com/llvm/llvm-project/issues/108014 (WebKit-specific issue report)
Because skia has strict requirements regarding contributor license agreements, I cannot contribute to upstream Skia. If somebody who is authorized to contribute to Skia could upstream it, that would be lovely, so we don't need to carry the diff in WebKit forever.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
(In reply to Michael Catanzaro from comment #0)
> If somebody who is
> authorized to contribute to Skia could upstream it, that would be lovely, so
> we don't need to carry the diff in WebKit forever.
Looks like you'd have to violate the CLA though, by representing the change as your own, which I probably should not encourage anybody to do. I suppose we'll just have to maintain a diff forever.
Michael Catanzaro
Pull request: https://github.com/WebKit/WebKit/pull/33906
EWS
Committed 285261@main (1f021868c255): <https://commits.webkit.org/285261@main>
Reviewed commits have been landed. Closing PR #33906 and removing active labels.