Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 44d3c5c94dc71fda8748e63c60a5270f2d5e80df
https://github.com/WebKit/WebKit/commit/44d3c5c94dc71fda8748e63c60a5270f2d5e80df
Author: Claudio Saavedra <[email protected]>
Date: 2026-08-26 (Wed, 26 Aug 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirCustom.h
M Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp
M Source/JavaScriptCore/heap/MarkingConstraintSolver.h
M Source/WTF/wtf/ScopedLambda.h
Log Message:
-----------
REGRESSION(319727@main): Broke the build with clang 20 due to a
self-referential ScopedLambda constraint
https://bugs.webkit.org/show_bug.cgi?id=322567
Reviewed by Carlos Garcia Campos.
319727@main gave ScopedLambda a converting constructor from any invocable,
constrained on Invocable<Functor, Signature> but not against ScopedLambda
itself. That makes Invocable<ScopedLambda<Sig>, Sig> circular: it asks whether
a std::function<Sig> is assignable from the functor, libstdc++ answers through
is_nothrow_constructible<ScopedLambda, ScopedLambda>, and resolving that checks
this constructor's own constraint again. clang 18 through 20 reject the cycle,
both where a ScopedLambda is copied (Air) and where the concept is applied to
one directly (Options::initialize). clang 21 and GCC accept it, so EWS did not
catch it.
Constrain the constructor against ScopedLambda, as std::optional and
CompactVariant do; the conjunction short-circuits, so Invocable is never
evaluated for ScopedLambda.
Two callees still took a ScopedLambda by value, which selected the converting
constructor rather than a copy. With it excluded, and the copy constructor
deleted by 319843@main, they have no viable constructor left. Take them by
const reference, like every other ScopedLambda parameter in the tree.
* Source/JavaScriptCore/b3/air/AirCustom.h:
(JSC::B3::Air::PatchCustom::forEachArg):
* Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp:
(JSC::MarkingConstraintSolver::execute):
(JSC::MarkingConstraintSolver::runExecutionThread):
* Source/JavaScriptCore/heap/MarkingConstraintSolver.h:
* Source/WTF/wtf/ScopedLambda.h:
(WTF::ScopedLambda<ResultType):
Canonical link: https://commits.webkit.org/319872@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications