-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang] Assertion `((IndexOfCaptureReadyLambda != (FunctionScopes.size() - 1)) || S.getCurGenericLambda()) && "The capture ready lambda for a potential capture can only be the " "current lambda if it is a generic lambda"' failed #115931
Comments
For reference, the WebKit build was configured with: CC=clang CXX=clang++ \
PATH="/opt/clang/latest/bin:$PATH" \
cmake -DPORT=GTK -DCMAKE_INSTALL_PREFIX=$HOME/.prefix/webkitgtk4 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release \
-DENABLE_SPEECH_SYNTHESIS=OFF -GNinja -Bbuild-gtk4 |
@aperezdc and I had a bit more of a look at that, this is the reduced test case we come up (using cvise and clang from the release/19.x and an interestingness script that is seeking the "The capture ready lambda for a potential capture can only be" error message. Because of this, other aspects of the input may of course have been broken along the way. This produces the following minimised test case: constexpr int value;
template <typename _Tp> _Up __declval;
template < typename _Tp > auto declval (__declval< _Tp >(0);
template < typename > struct __result_of_success;
template < bool, bool, typename... > struct __result_of_impl;
template < typename _Fn> __result_of_success< decltype(declval< _Fn >) > _S_test;
template < typename _Functor, typename... _ArgTypes > struct __result_of_impl< false, false, _Functor, _ArgTypes... > {
using type = decltype(_S_test<_Functor>); }
template < typename _Functor > struct __invoke_result : __result_of_impl< value, value, _Functor > ;
template < typename _Tp > _Tp forward();
template < typename _Callable> invoke_result_t< _Callable > invoke( _Callable ;
template < class A > struct Visitor : A struct Range { }
All;
template < typename T > struct Point { T y };
template < typename T > struct Size { T height0 };
template < Range = All > struct LengthPercentageValue { template < typename F > auto visit(F) { invoke(forward< F >());
}
template <typename... F> auto switchOn(F...) {
Visitor<F...> __trans_tmp_1;
visit(__trans_tmp_1)
}
}
;
template <Range = All>
struct LengthPercentage {
LengthPercentageValue<> value;
} template <auto aR, auto bR>
auto reflectSum(LengthPercentage<aR> a,
LengthPercentage<bR>) {
auto resultR(bR);
a.value.switchOn(
[&](auto) -> LengthPercentage<resultR> {
});
}
struct Xywh {
using Location = Point<LengthPercentage<>>;
using Size = Size<LengthPercentage<>>;
Location location;
Size size;
namespace;
Xywh operator0_value auto operator0() {
auto location(
operator0_value.location) auto
size(operator0_value.size);
reflectSum(location.y, size.height) I can confirm that the assert is hit in a current (or at least, as of this morning) HEAD clang. I'll set off another reduction over night with an interestingness test that rejects inputs that produce additional errors. |
Based on the last snippet, it looks like it started in clang-18: https://godbolt.org/z/Mozff8nGj So if we think there is another clang-19 specific regression then we need more of a reduction. |
@llvm/issue-subscribers-clang-frontend Author: Adrian Perez (aperezdc)
This was found building WebKitGTK at commit https://github.com/WebKit/WebKit/commit/d9758a8fd190860ac6c4a468dfdea906786530e5
Clang was built using this PKGBUILD for Arch Linux. Stack dump:
I have zipped the source and run script because the source is huge and GitHub wouldn't take it otherwise: source-and-runscript.zip |
This was found building WebKitGTK at commit WebKit/WebKit@d9758a8
Clang was built using this PKGBUILD for Arch Linux.
Stack dump:
I have zipped the source and run script because the source is huge and GitHub wouldn't take it otherwise: source-and-runscript.zip
The text was updated successfully, but these errors were encountered: