[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-09-01 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158499#4634166 , @steakhal wrote: > @danix800 FYI I think you used the wrong revision link in the commit. Maybe > mark this revision as "abandoned" again, to reflect the actual status. Sorry for this mistake. D158707

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-09-01 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. https://github.com/llvm/llvm-project/commit/12559064e05a11e8418425de59d8745f0cfb1122 mistakingly linked here. The actual revision is D158707 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-09-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. @danix800 FYI I think you used the wrong revision link in the commit. Maybe mark this revision as "abandoned" again, to reflect the actual status. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158499/new/ https://reviews.

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-23 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. In D158499#4608974 , @danix800 wrote: > One of the observable issue with inconsistent size type is > > void clang_analyzer_eval(int); > > typedef unsigned long long size_t; > void *malloc(unsigned long size); > void

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. > I suspected that the wrong cast modeling and how we infer what value ranges > are calculated is susceptible to such APSInt signedness issues, but I haven't > seen a case in the wild for extents. Thus, I didn't think of fixing it > either. But yes, we should. I think

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D158499#4608847 , @danix800 wrote: > We have `getDynamicExtentWithOffset` to use, which can handle more general > dynamic memory based cases than this fix. > > I'll abandon this one. > > There are issues worth clarifying and f

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. One of the observable issue with inconsistent size type is void clang_analyzer_eval(int); typedef unsigned long long size_t; void *malloc(unsigned long size); void free(void *); void symbolic_longlong_and_int0(long long len) { char *a = malloc(5);

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. We have `getDynamicExtentWithOffset` to use, which can handle more general dynamic memory based cases than this fix. I'll abandon this one. There are issues worth clarifying and fixing: 1). Debugging APIs like `clang_analyzer_dumpExtent` in `ExprInspection` might be e

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D158499#4606337 , @danix800 wrote: > In D158499#4606291 , @steakhal > wrote: > >> Thanks for submitting this. >> A funny thing is that in my free time I was also working on this last

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158499#4606291 , @steakhal wrote: > Thanks for submitting this. > A funny thing is that in my free time I was also working on this last week. > I'll have a look at this more in depth during the week. > For the mean time here

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Thanks for submitting this. A funny thing is that in my free time I was also working on this last week. I'll have a look at this more in depth during the week. For the mean time here is my version, committed pretty much a couple days ago to my fork. https://github.com/l

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 552288. danix800 added a comment. Update testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158499/new/ https://reviews.llvm.org/D158499 Files: clang/lib/StaticAnalyzer/Core/DynamicExtent.cpp clang/te

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-22 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. 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. danix800