[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-14 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/71373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-09 Thread via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/DonatNagyE approved this pull request. Thanks for adding the missing TC! https://github.com/llvm/llvm-project/pull/71373 ___ cfe-commits mailing list

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-09 Thread Balázs Kéri via cfe-commits
balazske wrote: The checker was already tested on some projects, but much more is needed to find such corner cases. It can be better to manually check the functions for cases when a 0 return value is not possible or only at a special (known) case.

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-09 Thread Balázs Kéri via cfe-commits
balazske wrote: I tested on vim and the problematic report disappeared, no other changes were detected. https://github.com/llvm/llvm-project/pull/71373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/71373 From 653aeb7f5b0d0f200b3f706bad770a9be643669c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 3 Nov 2023 09:48:18 +0100 Subject: [PATCH 1/2] [clang][analyzer] Improve

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-07 Thread via cfe-commits
DonatNagyE wrote: > Moreover, I think that TC shows that it would be useful to see the behavior > of this change on open source projects as I fear that this change could lead > to "technically TP, but not helpful for the user" reports. On a second thought, AFAIK there are already other

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-07 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/71373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-07 Thread via cfe-commits
https://github.com/DonatNagyE requested changes to this pull request. Sorry for undoing my approval, but as I was reviewing your other commit #71392 I noticed that it includes a testcase (the change in clang/test/Analysis/std-c-library-functions-path-notes.c) that logically belongs to this

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-07 Thread via cfe-commits
DonatNagyE wrote: Feel free to merge this @balazske, and thanks for the improvement! https://github.com/llvm/llvm-project/pull/71373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, but please wait for @DonatNagyE to have a look. BTW I noticed that the note messages are not tested, but I'm okay to not test that I think. https://github.com/llvm/llvm-project/pull/71373

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-06 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. This is straightforward small change that clarifies some _very confusing_ (but technically true positive) bug reports that I encountered on some open source projects. https://github.com/llvm/llvm-project/pull/71373

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes The functions 'readlink' and 'readlinkat' do return 0 only if the 'bufsize' argument is 0. --- Full diff: https://github.com/llvm/llvm-project/pull/71373.diff

[clang] [clang][analyzer] Improve StdLibraryFunctionsChecker 'readlink' modeling. (PR #71373)

2023-11-06 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/71373 The functions 'readlink' and 'readlinkat' do return 0 only if the 'bufsize' argument is 0. From 653aeb7f5b0d0f200b3f706bad770a9be643669c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=