[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow
Yurong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 10:04:21 PDT 2023
yronglin added a comment.
In D154784#4485752 <https://reviews.llvm.org/D154784#4485752>, @aaron.ballman wrote:
> In general, I think this is a good approach. However, it sort of kicks the can down the road a bit; we will still overflow the member if there are enough fields. Would it make sense to also add a diagnostic to Sema so that overflow with the widened fields is diagnosed rather than causing a crash?
Thanks you for take a look!
> Would it make sense to also add a diagnostic to Sema so that overflow with the widened fields is diagnosed rather than causing a crash?
Ah, I think your are right. It doesn't make sense, As the comments for `PseudoObjectExprBitfields` says `These don't need to be particularly wide, because they're strictly limited by the forms of expressions we permit.` I think developers who use `PseudoObjectExprBitfields` need to be more careful.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154784/new/
https://reviews.llvm.org/D154784
More information about the cfe-commits
mailing list