Bug 261598
Summary: | [MSVC][Win] Using C++20's concept cause WinCairo compiler to crash | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | Hironori.Fujii |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jean-Yves Avenard [:jya]
(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 <typename T>
concept IsNativePromise = std::is_base_of<NativePromiseBase, T>::value;
template <typename T, typename U>
concept RelatedNativePromise = requires(T, U)
{
{ IsNativePromise<T> };
{ IsNativePromise<U> };
{ std::is_same<typename T::NativePromiseBaseType, typename U::NativePromiseBaseType>::value };
};
```
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Jean-Yves Avenard [:jya]
The compiler crashes with:
```
C:\BW\WinCairo-EWS\build\WebKitBuild\Release\WTF\Headers\wtf/TypeTraits.h(134): fatal error C1001: Internal compiler error.
```
Jean-Yves Avenard [:jya]
I can confirm that it's just this one:
```
template <typename T, typename U>
concept RelatedNativePromise = requires(T, U)
{
{ IsNativePromise<T> };
{ IsNativePromise<U> };
{ std::is_same<typename T::NativePromiseBaseType, typename U::NativePromiseBaseType>::value };
};
```
that causes the crash
Jean-Yves Avenard [:jya]
Wth the migration from mcvc to clang-cl this may no longer be an issue.
Fujii Hironori
The migration isn't completed yet. I will remove the #if after the migration is completed.
Fujii Hironori
WebKit Windows port hasn't dropped MSVC support yet.
VS 2022 v17.9.6 still reports the internal compiler error for wtf/TypeTraits.h.
Fujii Hironori
*** This bug has been marked as a duplicate of bug 274018 ***