<?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>261598</bug_id>
          
          <creation_ts>2023-09-15 02:25:01 -0700</creation_ts>
          <short_desc>[MSVC][Win] Using C++20&apos;s concept cause WinCairo compiler to crash</short_desc>
          <delta_ts>2024-05-10 21:45:38 -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>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>274018</dup_id>
          
          <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="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1977653</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-09-15 02:25:01 -0700</bug_when>
    <thetext>(Using Tools / Test component for lack of a better component)

I added usage of C++20 concept in a PR, WinCairo bots crashes when parsing that file.

https://ews-build.webkit.org/#/builders/32/builds/17174

This is the added code causing an issue:

```
class NativePromiseBase;

template &lt;typename T&gt;
concept IsNativePromise = std::is_base_of&lt;NativePromiseBase, T&gt;::value;

template &lt;typename T, typename U&gt;
concept RelatedNativePromise = requires(T, U)
{
    { IsNativePromise&lt;T&gt; };
    { IsNativePromise&lt;U&gt; };
    { std::is_same&lt;typename T::NativePromiseBaseType, typename U::NativePromiseBaseType&gt;::value };
};
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977654</commentid>
    <comment_count>1</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-09-15 02:25:30 -0700</bug_when>
    <thetext>The compiler crashes with:

```
C:\BW\WinCairo-EWS\build\WebKitBuild\Release\WTF\Headers\wtf/TypeTraits.h(134): fatal error C1001: Internal compiler error.
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977658</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-09-15 03:21:11 -0700</bug_when>
    <thetext>I can confirm that it&apos;s just this one:

```
template &lt;typename T, typename U&gt;
concept RelatedNativePromise = requires(T, U)
{
    { IsNativePromise&lt;T&gt; };
    { IsNativePromise&lt;U&gt; };
    { std::is_same&lt;typename T::NativePromiseBaseType, typename U::NativePromiseBaseType&gt;::value };
};
```

that causes the crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983021</commentid>
    <comment_count>3</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-10-05 16:32:14 -0700</bug_when>
    <thetext>Wth the migration from mcvc to clang-cl this may no longer be an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983054</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-10-05 17:38:05 -0700</bug_when>
    <thetext>The migration isn&apos;t completed yet. I will remove the #if after the migration is completed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2030143</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-04-22 01:09:15 -0700</bug_when>
    <thetext>WebKit Windows port hasn&apos;t dropped MSVC support yet.
VS 2022 v17.9.6 still reports the internal compiler error for wtf/TypeTraits.h.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2034684</commentid>
    <comment_count>6</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-05-10 21:45:38 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>