[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 06:07:41 PST 2024
================
@@ -4515,6 +4515,8 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type,
}
APValue Lit;
+ // Make sure we clean up the temporary created below.
+ FullExpressionRAII CleanupTemps(Info);
----------------
kadircet wrote:
> we could probably construct some examples that break after this change.
fair enough, i am not sure about the change either. wanted to throw it out to get some more thoughts from community.
> Could we get a reduced test case?
i hope so. i am still running a creduce, file is still too big though :(
https://github.com/llvm/llvm-project/pull/118480
More information about the cfe-commits
mailing list