@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.isInvalid())
AaronBallman wrote:
Ah you are c
https://github.com/AaronBallman commented:
The changes LGTM, but please add a release note to clang/docs/ReleaseNotes.rst
so users know about the fix.
https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing list
cfe-commits@lists.llvm.
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Endilll wrote:
> @Endilll you are able to reduce that further?
I don't see the original reproducer anywhere. Snippet in the description is
already reduced (and got quite damaged in the process). I can reduce it myself
if someone point me out to the original reproducer
https://github.com/llvm/
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 588762c4c3a1e01f4cf2bd418a8545b79a6b5371 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 588762c4c3a1e01f4cf2bd418a8545b79a6b5371 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 588762c4c3a1e01f4cf2bd418a8545b79a6b5371 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 588762c4c3a1e01f4cf2bd418a8545b79a6b5371 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 01a5dd6e5bfc612678818035b88f85fda5c039d1 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 01a5dd6e5bfc612678818035b88f85fda5c039d1 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a ExprResult
yuxuanchen1997 wrote:
@AaronBallman I have good news. I was able to manually write a well-formed C++
file that crashes.
https://gist.github.com/yuxuanchen1997/576dce964666f0f8713fccacf5847138
And I am able to validate that the fix I proposed here does fix the problem.
https://github.com/llvm
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.isInvalid())
yuxuanchen1997 wrote:
If you loo
dcci wrote:
> > > You should also add test coverage (clang/test/SemaCXX) for the changes
> > > and a release note (clang/docs/ReleaseNotes.rst).
> >
> >
> > @AaronBallman -- are you OK with a crash-on-invalid (the one in first
> > post)? The original example we had crashed on valid code, but
dcci wrote:
> You should also add test coverage (clang/test/SemaCXX) for the changes and a
> release note (clang/docs/ReleaseNotes.rst).
@AaronBallman -- are you OK with a crash-on-invalid (the one in first post)?
The original example we had crashed on valid code, but reducing a 35MB file
wit
https://github.com/dcci deleted https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.isInvalid())
dcci wrote:
@AaronBallman -- are
cor3ntin wrote:
@Endilll you are able to reduce that further?
https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman commented:
Thank you!
You should also add test coverage (clang/test/SemaCXX) for the changes and a
release note (clang/docs/ReleaseNotes.rst).
https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing lis
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.isInvalid())
AaronBallman wrote:
Under what c
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/98102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/98102
>From 01a5dd6e5bfc612678818035b88f85fda5c039d1 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 8 Jul 2024 18:16:17 -0700
Subject: [PATCH] [clang] fix sema init crash for not checking a ExprResult
--
@@ -5576,6 +5576,10 @@ static void TryOrBuildParenListInitialization(
ExprResult ER;
ER = IS.Perform(S, SubEntity, SubKind,
Arg ? MultiExprArg(Arg) : std::nullopt);
+
+ if (ER.IsInvalid())
+return false;
+
if (InitExpr)
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Yuxuan Chen (yuxuanchen1997)
Changes
We ran into a FE crash and root caused to `ER.get()` on line 5584 here being
nullptr. I think this is a result of not checking if ER here is invalid.
We have been using automated reduction tools (like
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/98102
We ran into a FE crash and root caused to `ER.get()` on line 5584 here being
nullptr. I think this is a result of not checking if ER here is invalid.
We have been using automated reduction tools (like CR
24 matches
Mail list logo