<?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>185947</bug_id>
          
          <creation_ts>2018-05-24 07:26:08 -0700</creation_ts>
          <short_desc>WebKit (JavaScriptCore) compilation error with Clang ≥ 6</short_desc>
          <delta_ts>2018-06-21 20:02:00 -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>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8209</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>185198</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ting-Wei Lan">lantw44</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1426923</commentid>
    <comment_count>0</comment_count>
    <who name="Ting-Wei Lan">lantw44</who>
    <bug_when>2018-05-24 07:26:08 -0700</bug_when>
    <thetext>Here are the error messages when compiling WebKitGTK+ 2.21.2 with Clang 6. The current WebKit trunk also has the same problem.

In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource26.cpp:6:
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:109:12: error: functional-style cast from &apos;CodeLocationLabel&lt;JSInternalPtrTag&gt;&apos; to &apos;CodeLocationJump&lt;JSInternalPtrTag&gt;&apos; uses deleted function
    return CodeLocationJump&lt;JSInternalPtrTag&gt;(m_callReturnLocationOrPatchableJump);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:336:5: note: candidate function [with T = JSC::CodeLocationJump&lt;26432&gt;, $1 = void] has been explicitly deleted
    operator T() = delete;
    ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:118:14: note: candidate constructor
    explicit CodeLocationJump(MacroAssemblerCodePtr&lt;tag&gt; location)
             ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:115:7: note: candidate is the implicit move constructor
class CodeLocationJump : public CodeLocationCommon&lt;tag&gt; {
      ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:115:7: note: candidate is the implicit copy constructor
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:120:14: note: candidate constructor
    explicit CodeLocationJump(void* location)
             ^
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource26.cpp:6:
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:115:12: error: functional-style cast from &apos;CodeLocationLabel&lt;JSInternalPtrTag&gt;&apos; to &apos;CodeLocationDataLabelPtr&lt;JSInternalPtrTag&gt;&apos; uses deleted function
    return CodeLocationDataLabelPtr&lt;JSInternalPtrTag&gt;(m_hotPathBeginOrSlowPathStart);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:336:5: note: candidate function [with T = JSC::CodeLocationDataLabelPtr&lt;26432&gt;, $1 = void] has been explicitly deleted
    operator T() = delete;
    ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:177:14: note: candidate constructor
    explicit CodeLocationDataLabelPtr(MacroAssemblerCodePtr&lt;tag&gt; location)
             ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:174:7: note: candidate is the implicit move constructor
class CodeLocationDataLabelPtr : public CodeLocationCommon&lt;tag&gt; {
      ^
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:174:7: note: candidate is the implicit copy constructor
/home/lantw44/gnome/source/webkitgtk-2.21.2/Source/JavaScriptCore/assembler/CodeLocation.h:179:14: note: candidate constructor
    explicit CodeLocationDataLabelPtr(void* location)
             ^
2 errors generated.


I also tested a few other Clang versions, and the results are:

Clang 4 fails to compile with different error messages. I guess it is probably too old for C++17.
Clang 5 works fine.
Clang 6 fails to compile with the above error messages.
Clang 7 git snapshot (commit 53dc71d2945a91fde75ec241f48776fc739d2f75, date 2018-05-06) also fails to compile with the same messages as Clang 6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1426944</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2018-05-24 09:17:47 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 185198 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1430894</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2018-06-07 09:50:25 -0700</bug_when>
    <thetext>Reopening to fix the warnings from using the C++17 compiler in Clang 6.0.

We will have to fix these eventually, so we might as well do it now that we know about it in case they point to real issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1430901</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2018-06-07 09:57:08 -0700</bug_when>
    <thetext>(In reply to David Kilzer (:ddkilzer) from comment #2)
&gt; Reopening to fix the warnings from using the C++17 compiler in Clang 6.0.
&gt; 
&gt; We will have to fix these eventually, so we might as well do it now that we
&gt; know about it in case they point to real issues.

If Bug 185198 is going to be used to fix the Clang 6.0+ warnings, then feel free to dupe this back to Bug 185198.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1430919</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-07 10:36:17 -0700</bug_when>
    <thetext>Well, really only the error is reported here, it might be better to create a new bug for solving the warnings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1430920</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-07 10:36:48 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; Well, really only the error is reported here, it might be better to create a
&gt; new bug for solving the warnings.

(No warnings have been reported on Bugzilla thus far, to my knowledge.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435310</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-06-21 17:03:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/40131933&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435312</commentid>
    <comment_count>7</comment_count>
      <attachid>343292</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-06-21 17:08:58 -0700</bug_when>
    <thetext>Created attachment 343292
proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435317</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-06-21 17:11:29 -0700</bug_when>
    <thetext>Thanks.  Will land once the EWS bots are green.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435347</commentid>
    <comment_count>9</comment_count>
      <attachid>343292</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-06-21 20:01:58 -0700</bug_when>
    <thetext>Comment on attachment 343292
proposed patch.

Clearing flags on attachment: 343292

Committed r233070: &lt;https://trac.webkit.org/changeset/233070&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435348</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-06-21 20:02:00 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>343292</attachid>
            <date>2018-06-21 17:08:58 -0700</date>
            <delta_ts>2018-06-21 20:01:58 -0700</delta_ts>
            <desc>proposed patch.</desc>
            <filename>bug-185947.patch</filename>
            <type>text/plain</type>
            <size>1562</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMjMzMDY4KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBA
CisyMDE4LTA2LTIxICBNYXJrIExhbSAgPG1hcmsubGFtQGFwcGxlLmNvbT4KKworICAgICAgICBX
ZWJLaXQgKEphdmFTY3JpcHRDb3Jl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