<?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>244758</bug_id>
          
          <creation_ts>2022-09-03 02:19:42 -0700</creation_ts>
          <short_desc>JSC fails to compile with clang 15 and libc++</short_desc>
          <delta_ts>2022-09-19 21:47:17 -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 Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>245183</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, InRadar</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1895995</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2022-09-03 02:19:42 -0700</bug_when>
    <thetext>With upcoming clang-15 and libc++ runtime, I am seeing a build failure in JSC, with clang-14 and libc++ it works ok.

| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-3a3c4ec0-3.cpp:1:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/webkitgtk-2.36.7/Source/JavaScriptCore/jit/JIT.cpp:26:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/webkitgtk-2.36.7/Source/JavaScriptCore/config.h:38:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/build/WTF/Headers/wtf/FastMalloc.h:26:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/build/WTF/Headers/wtf/StdLibExtras.h:30:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/memory:842:
| In file included from /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/move.h:12:
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/iterator_operations.h:100:5: error: static assertion failed due to requirement &apos;is_same&lt;JSC::UnlinkedCallLinkInfo &amp;, con
st JSC::UnlinkedCallLinkInfo &amp;&gt;::value&apos;: It looks like your iterator&apos;s `iterator_traits&lt;It&gt;::reference` does not match the return type of dereferencing the iterator, i.e., calling `*it`. This is undefined behavior according to [input.iterators]
and can lead to dangling reference issues at runtime, so we are flagging this.
|     static_assert(is_same&lt;__deref_t&lt;_Iter&gt;, typename iterator_traits&lt;__uncvref_t&lt;_Iter&gt; &gt;::reference&gt;::value,
|     ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/iterator_operations.h:115:5: note: in instantiation of function template specialization &apos;std::_IterOps&lt;std::_ClassicAlgP
olicy&gt;::__validate_iter_reference&lt;WTF::SegmentedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt; &amp;&gt;&apos; requested here
|     __validate_iter_reference&lt;_Iter&gt;();
|     ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/move.h:34:39: note: in instantiation of function template specialization &apos;std::_IterOps&lt;std::_ClassicAlgPolicy&gt;::__iter_
move&lt;WTF::SegmentedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt; &amp;&gt;&apos; requested here
|     *__result = _IterOps&lt;_AlgPolicy&gt;::__iter_move(__first);
|                                       ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/move.h:97:21: note: in instantiation of function template specialization &apos;std::__move_impl&lt;std::_ClassicAlgPolicy, WTF::
SegmentedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt;, WTF::SegmentedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt;, JSC::UnlinkedCallLinkInfo *&gt;&apos; requested here
|   auto __ret = std::__move_impl&lt;_AlgPolicy&gt;(
|                     ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/move.h:114:15: note: in instantiation of function template specialization &apos;std::__move&lt;std::_ClassicAlgPolicy, WTF::Segm
entedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt;, WTF::SegmentedVectorIterator&lt;JSC::UnlinkedCallLinkInfo, 8&gt;, JSC::UnlinkedCallLinkInfo *&gt;&apos; requested here
|   return std::__move&lt;_ClassicAlgPolicy&gt;(__first, __last, __result).second;
|               ^
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/webkitgtk-2.36.7/Source/JavaScriptCore/jit/JIT.cpp:993:14: note: in instantiation of function template specialization &apos;std::__1::move&lt;WTF::SegmentedVectorIterator&lt;JSC
::UnlinkedCallLinkInfo, 8&gt;, JSC::UnlinkedCallLinkInfo *&gt;&apos; requested here
|         std::move(m_unlinkedCalls.begin(), m_unlinkedCalls.end(), m_jitCode-&gt;m_unlinkedCalls.begin());
|              ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895999</commentid>
    <comment_count>1</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2022-09-03 02:28:18 -0700</bug_when>
    <thetext>here is where the error originates

| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/webkitgtk-2.36.7/Source/JavaScriptCore/jit/JIT.cpp:993:14: note: in instantiation of function template specialization &apos;std::__1::move&lt;WTF::SegmentedVectorIterator&lt;JSC
::UnlinkedCallLinkInfo, 8&gt;, JSC::UnlinkedCallLinkInfo *&gt;&apos; requested here
|         std::move(m_unlinkedCalls.begin(), m_unlinkedCalls.end(), m_jitCode-&gt;m_unlinkedCalls.begin());
|              ^



/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/webkitgtk/2.36.7-r0/webkitgtk-2.36.7/Source/JavaScriptCore/jit/JIT.cpp:996:14: note: in instantiation of function template specialization &apos;std::__1::move&lt;WTF::SegmentedVectorIterator&lt;JSC
::UnlinkedStructureStubInfo, 8&gt;, JSC::UnlinkedStructureStubInfo *&gt;&apos; requested here
|         std::move(m_unlinkedStubInfos.begin(), m_unlinkedStubInfos.end(), m_jitCode-&gt;m_unlinkedStubInfos.begin());
|              ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896113</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2022-09-03 21:08:16 -0700</bug_when>
    <thetext>Full log is here

http://sprunge.us/SUk8No</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1897504</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-10 02:20:22 -0700</bug_when>
    <thetext>&lt;rdar://problem/99775258&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899715</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2022-09-19 21:47:17 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 245183 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>