[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, xazax.hun, donat.nagy, Szelethus. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware. Herald added a project: All. steakhal requested review of this revision. Herald

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-30 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. Good direction of development, this will be useful for providing better bug reports (in addition to ensuring correct behavior some situations). Note that it's also possible to dereference pointers with the operator `->`, which is represented by `MemberExpr`s in the A

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-31 Thread Balázs Benics via Phabricator via cfe-commits
steakhal abandoned this revision. steakhal added a comment. In D159107#4627903 , @donat.nagy wrote: > Good direction of development, this will be useful for providing better bug > reports (in addition to ensuring correct behavior some situations). > No

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-31 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. I don't think that the `&arr[N]` issue is too serious: we can just increment the array extent when the parent expression of the array subscript operator is the unary operator `&`. If the past-the-end pointer ends up dereferenced later, the current code is sufficient

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-31 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D159107#4630573 , @donat.nagy wrote: > I don't think that the `&arr[N]` issue is too serious: we can just increment > the array extent when the parent expression of the array subscript operator > is the unary operator `&`.

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-31 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. In D159107#4630764 , @steakhal wrote: > In D159107#4630573 , @donat.nagy > wrote: > >> I don't think that the `&arr[N]` issue is too serious: we can just increment >> the array extent

[PATCH] D159107: [analyzer] ArrayBoundCheckerV2 should disallow forming lvalues to out-of-bounds locations

2023-08-31 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D159107#4631069 , @donat.nagy wrote: > In D159107#4630764 , @steakhal > wrote: > >> In D159107#4630573 , @donat.nagy >> wrote: >> >>> I don