<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>279985</bug_id>
          
          <creation_ts>2024-09-19 08:45:19 -0700</creation_ts>
          <short_desc>Build fails on ppc64le due to MUST_TAIL_CALL when tail call is not possible</short_desc>
          <delta_ts>2024-10-16 07:13:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2061482</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-09-19 08:45:19 -0700</bug_when>
    <thetext>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=\&quot;/usr/bin/bwrap\&quot; -DDBUS_PROXY_EXECUTABLE=\&quot;/usr/bin/xdg-dbus-proxy\&quot; -DGETTEXT_PACKAGE=\&quot;
WebKitGTK-6.0\&quot; -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&apos;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&apos;t need to carry the diff in WebKit forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061489</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-09-19 09:07:46 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; If somebody who is
&gt; authorized to contribute to Skia could upstream it, that would be lovely, so
&gt; we don&apos;t need to carry the diff in WebKit forever.

Looks like you&apos;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&apos;ll just have to maintain a diff forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061490</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-09-19 09:09:09 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/33906</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068381</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-16 07:13:16 -0700</bug_when>
    <thetext>Committed 285261@main (1f021868c255): &lt;https://commits.webkit.org/285261@main&gt;

Reviewed commits have been landed. Closing PR #33906 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>