[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-09 Thread Tomasz Kamiński via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2fb3bec932ed: [analyzer] Fix crash for array-delete of UnknownVal values. (authored by tomasz-kaminski-sonarsource). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs accepted this revision. isuckatcs added a comment. This revision is now accepted and ready to land. I have nothing else to add, this patch looks good to me. If the others don't have anything to add either, feel free to commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1244 SVal *ElementCountVal) { + assert(Region != nullptr && "Null-regions passed to prepareStateForArrayDestruction."); ---

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 473166. tomasz-kaminski-sonarsource marked an inline comment as done. tomasz-kaminski-sonarsource added a comment. Added assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136671/new/ http

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-01 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1244 SVal *ElementCountVal) { + assert(Region != nullptr && "Null-regions passed to prepareStateForArrayDestruction."); I me

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 470489. tomasz-kaminski-sonarsource added a comment. Added assertion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136671/new/ https://reviews.llvm.org/D136671 Files: clang/lib/StaticAna

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > For me, it makes sense that getDynamicElementCount() is not intended to be > called on a null MemRegion. It would still be helpful to have an assertion on that inside `getDynamicElementCount()`, so the caller will know it right away. What I want to say is that it s

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D136671#3882166 , @isuckatcs wrote: >> This eliminate the crash in `getDynamicElementCount` on that region > > I think that if the crash comes from `getDynamicElementCount`, we should > address it there too, so > when the fu

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. In D136671#3882166 , @isuckatcs wrote: >> This eliminate the crash in `getDynamicElementCount` on that region > > I think that if the crash comes from `getDynamicElementCount`, we should > address it there too

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > This eliminate the crash in `getDynamicElementCount` on that region I think that if the crash comes from `getDynamicElementCount`, we should address it there too, so when the function is called elsewhere under the same circumstances it won't crash again. What do y

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. tomasz-kaminski-sonars