[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-06-03 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-06-03 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 1da3d4dc3c74f1240e7d921c97b0c7eea2a53e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH 1/2] [clang][analyzer] Move

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: Rebased and squashed noisy small commits. https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 1da3d4dc3c74f1240e7d921c97b0c7eea2a53e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH] [clang][analyzer] Move

[clang] [llvm] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 429cbcfb14295aaf07997082fed0820b6f79f4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:28:12 +0200 Subject: [PATCH 1/2] [workflow] Add AI review for PRs ---

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 ready_for_review https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/93815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/93799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/93812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93815 From 895ff8779b11294f132604e40572ebec8b6bc4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 29 May 2024 00:38:07 +0200 Subject: [PATCH 1/2] [clang][analyzer] Move

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/93812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93812 From 54f117258b936b9448e2fb93dc2307e23629b85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 28 May 2024 23:13:07 +0200 Subject: [PATCH] [clang][analyzer][NFC] Improve docs of

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > It's good to document this, the commit LGTM. Are you planning to fix this > soon? I have been looking into the [alpha.unix.PthreadLock](https://clang.llvm.org/docs/analyzer/checkers.html#alpha-unix-pthreadlock-c) checker. By reusing the logic there

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-31 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > What's the relationship between this PR and #93799 ? > > Otherwise, the change LGTM, but you might want to either unify these two NFC > changes into a single commit or ensure that they're independent. Thanks for checking this! To be honest, I started working on this, and

[clang] [clang][analyzer][NFC] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/93799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/3] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer] Move unix.BlockInCriticalSection out of alpha (PR #93815)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93815 After recent improvements, and testing on open source projects, the checker is ready to move out of the alpha package. I would like to land #93799 and #93799 first, then this modification. I have ran this

[clang] [clang][analyzer][NFC] Improve docs of alpha.unix.BlockInCriticalSection (PR #93812)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93812 - Enhanced descriptions for blocking and critical section functions - Added an additional code sample highlighting interleaved C and C++ style mutexes - Introduced a new section on limitations From

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH 1/2] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/93799 From 6cc7b93783993e0e7f21124f2d640cb92484faff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Thu, 30 May 2024 11:12:59 +0200 Subject: [PATCH] [clang][analyzer][NFC] Add test for a

[clang] [clang][analyzer][tests] Add test for a limitation of alpha.unix.Bloc… (PR #93799)

2024-05-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/93799 …kInCriticalSection checker Updated the documentation in `checkers.rst` to include an example of how `trylock` function is handled. Added a new test for a scenario where `pthread_mutex_trylock` is used,

[clang] [clang][analyzer] Fix a crash in alpha.unix.BlockInCriticalSection (PR #90030)

2024-05-15 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From af05be993f4789705cde374dbf7efefd9a18f1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/90030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/90030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: After reducing a crashing TU, I have found, that the issue came up without CTU analysis as well. I have added a test case that demonstrates the crash without the fix. I also updated the commit message to reflect the real cause. https://github.com/llvm/llvm-project/pull/90030

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From af05be993f4789705cde374dbf7efefd9a18f1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH] [clang][analyzer] Fix

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From ca7be03d939d3375e9075fc287393d3b5e5a2c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-05-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/90030 From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 9 Apr 2024 10:44:43 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder'. (PR #91445)

2024-05-13 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. Emitting a note to the location where the first part of the detected pattern (the `setuid(getuid())` call) seems like useful information, but this patch is great as it is. You could also add it in another patch if it is not trivial.

[clang] [analyzer] Use explicit call description mode in more checkers (PR #90974)

2024-05-06 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM, I especially like how InnerPointerChecker was simplified. https://github.com/llvm/llvm-project/pull/90974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-04-25 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/90030 In CTU there is not always an AnalysisDeclContext for a given call. This led to crashes. The AnalysisDeclContext access is now checked. From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/80029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-18 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/3] [clang][analyzer] Improve

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -70,73 +202,121 @@ class BlockInCriticalSectionChecker : public Checker { } // end anonymous namespace -REGISTER_TRAIT_WITH_PROGRAMSTATE(MutexCounter, unsigned) +REGISTER_LIST_WITH_PROGRAMSTATE(ActiveCritSections, CritSectionMarker) -void

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/2] [clang][analyzer] Improve

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-10 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: As keeping the trivial change that this PR was before, and thanks to the fact that the checker needed a major overhaul, I have increased the scope of this change to support the use cases mentioned by @balazske. That is why I am re-requesting a review.

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/80029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-03-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From 346e2296869e750c7ec5bd75cf05f80a23b70569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH] [clang][analyzer] Improve

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/83432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
@@ -27,20 +27,48 @@ class IdentifierInfo; namespace clang { namespace ento { - -enum CallDescriptionFlags : unsigned { - CDF_None = 0, - - /// Describes a C standard function that is sometimes implemented as a macro - /// that expands to a compiler builtin with some

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/83432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/83432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

2024-03-04 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: > > The flag approach can probably make a sense for namespace handling (match > > the exact specified namespace, or allow a prefix before, or even something > > in between). > > Even in that case, I'd prefer a separate second parameter (that's either > boolean or a different

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-21 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/81034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-21 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: I checked many false positives, even those that were not FP at first sight; I think we can live without them. I also agree that we should strive to handle comparison evaluation more uniformly and preferably behind the API barrier of the constraint manager. LGTM

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-02-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From f7875a7f1ff20f3cf850ce1c23bec6d6c3d88d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH 1/2] [clang][analyzer] Add note tags to

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-01-31 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/80029 From f7875a7f1ff20f3cf850ce1c23bec6d6c3d88d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue, 30 Jan 2024 11:33:30 +0100 Subject: [PATCH] [clang][analyzer] Add note tags to

[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-01-30 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/80029 checker On entering a critical section, a note tag is now placed along the bugpath. From 54da4f5ff32a0e35777fd77f6a928c65789c22af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Tue,

[clang] [analyzer] EnumCastOutOfRangeChecker: report the value (PR #74503)

2023-12-07 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/74503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 248c94c3b8dd29fa9d98419e53f42454a2225544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/3] [analyzer] Move

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: cleaned up the commiter email, as it was pointing to an old address https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 80c1f88244b22aaa4badb26384a971d19759b660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/3] [analyzer] Move

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-23 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 977e421008c1247d54f4cb67967ed2a353935c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/3] [analyzer] Move

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-22 Thread Endre Fülöp via cfe-commits
@@ -1009,11 +1002,20 @@ let ParentPackage = ENV in { "standard), which can lead to false positives depending on " "implementation.", "false", - InAlpha>, + Released>, ]>,

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-22 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/71912 From 977e421008c1247d54f4cb67967ed2a353935c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 10 Nov 2023 10:08:58 +0100 Subject: [PATCH 1/2] [analyzer] Move

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-20 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/72402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-20 Thread Endre Fülöp via cfe-commits
@@ -266,13 +266,18 @@ void CheckUseZeroAllocated1(void) { } char CheckUseZeroAllocated2(void) { + // FIXME: The return value of `alloca()` is modeled with `AllocaRegion` + // instead of `SymbolicRegion`, so the current implementation of + //

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-20 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM, added two remarks inline, but those can be separate patches as well. https://github.com/llvm/llvm-project/pull/72402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-20 Thread Endre Fülöp via cfe-commits
@@ -81,22 +81,21 @@ bool BuiltinFunctionChecker::evalCall(const CallEvent , case Builtin::BI__builtin_alloca_with_align: case Builtin::BI__builtin_alloca: { -// FIXME: Refactor into StoreManager itself? -MemRegionManager& RM =

[clang] [analyzer] Move security.cert.env.InvalidPtr out of alpha (PR #71912)

2023-11-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Move security.cert.env.InvalidPtr out of alpha (PR #71912)

2023-11-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/71912 Thanks to recent improvements in #67663, InvalidPtr checker does not emit any false positives on the following OS projects: memcached, tmux, curl, twin, vim, openssl, sqlite, ffmpeg, postgres, tinyxml2,

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/68191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-27 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/68191 From a08f51109bd93f88271f0548719c52c75afc96e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 4 Oct 2023 10:38:00 +0200 Subject: [PATCH 1/4] [analyzer] Extend EnumCastOutOfRange

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-26 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: @Xazax-hun Thanks for the review! I have modified the tracking a bit, because seeing the other usecases, and also just thinking through, the *subexpression* of the cast is what we are interested in upstream in the bugpath. I have added a very minimal test as well, and rebased.

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-26 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/68191 From a08f51109bd93f88271f0548719c52c75afc96e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 4 Oct 2023 10:38:00 +0200 Subject: [PATCH 1/3] [analyzer] Extend EnumCastOutOfRange

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/67663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-24 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: I have rebased on the current main. https://github.com/llvm/llvm-project/pull/67663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 65a4bf21e38a925f643c6cca3d3cad4c2910071c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 01/12] [analyzer][clangsa] Add new option

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 01/12] [analyzer][clangsa] Add new option

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-17 Thread Endre Fülöp via cfe-commits
@@ -84,33 +104,70 @@ class InvalidPtrChecker REGISTER_SET_WITH_PROGRAMSTATE(InvalidMemoryRegions, const MemRegion *) // Stores the region of the environment pointer of 'main' (if present). -REGISTER_TRAIT_WITH_PROGRAMSTATE(EnvPtrRegion, const MemRegion *)

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-17 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 01/11] [analyzer][clangsa] Add new option

[clang] [analyzer][NFC] Remove outdated FIXME comment (PR #68211)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/68211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Remove outdated FIXME comment (PR #68211)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. I can confirm the claims about HeapSpaceRegion being used: ![image](https://github.com/llvm/llvm-project/assets/3802256/682c69f1-7129-4d0f-873f-44aee0fa5f2f) https://github.com/llvm/llvm-project/pull/68211

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -94,23 +119,40 @@ REGISTER_MAP_WITH_PROGRAMSTATE(PreviousCallResultMap, const FunctionDecl *, void InvalidPtrChecker::EnvpInvalidatingCall(const CallEvent , CheckerContext ) const { StringRef FunctionName =

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -1,15 +1,49 @@ +// Default options. // RUN: %clang_analyze_cc1 \ // RUN: -analyzer-checker=core,alpha.security.cert.env.InvalidPtr \ // RUN: -verify -Wno-unused %s +// +// Test the laxer handling of getenv function (this is the

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -94,23 +119,40 @@ REGISTER_MAP_WITH_PROGRAMSTATE(PreviousCallResultMap, const FunctionDecl *, void InvalidPtrChecker::EnvpInvalidatingCall(const CallEvent , CheckerContext ) const { StringRef FunctionName =

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 01/10] [analyzer][clangsa] Add new option

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/9] [analyzer][clangsa] Add new option to

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/68191 From 6b70c3246747b5a1204062f40f91273f60a38600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Wed, 4 Oct 2023 10:38:00 +0200 Subject: [PATCH 1/2] [analyzer] Extend EnumCastOutOfRange

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/68191 EnumCastOutOfRange checker now reports the name of the enum in the warning message. Additionally, a note-tag is placed to highlight the location of the declaration. From

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-04 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/8] [analyzer][clangsa] Add new option to

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-03 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9f7f577c95d7e9fb7e2f929215ff217ca2d7ed53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/8] [analyzer][clangsa] Add new option to

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-03 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9f7f577c95d7e9fb7e2f929215ff217ca2d7ed53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/8] [analyzer][clangsa] Add new option to

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
@@ -146,16 +188,15 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall( // Remember to this region. const auto *SymRegOfRetVal = cast(RetVal.getAsRegion()); - const MemRegion *MR = - const_cast(SymRegOfRetVal->getBaseRegion()); + const MemRegion *MR =

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
@@ -25,19 +25,36 @@ using namespace clang; using namespace ento; + namespace { + class InvalidPtrChecker : public Checker { private: - BugType BT{this, "Use of invalidated pointer", categories::MemoryError}; + static const BugType *InvalidPtrBugType; + // For

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
@@ -2399,13 +2399,34 @@ pointer. These functions include: getenv, localeconv, asctime, setlocale, strerr char *p, *pp; p = getenv("VAR"); -pp = getenv("VAR2"); -// subsequent call to 'getenv' invalidated previous one +setenv("SOMEVAR", "VALUE",

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
@@ -2399,13 +2399,34 @@ pointer. These functions include: getenv, localeconv, asctime, setlocale, strerr char *p, *pp; p = getenv("VAR"); -pp = getenv("VAR2"); -// subsequent call to 'getenv' invalidated previous one +setenv("SOMEVAR", "VALUE",

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9f7f577c95d7e9fb7e2f929215ff217ca2d7ed53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/7] [analyzer][clangsa] Add new option to

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-02 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9f7f577c95d7e9fb7e2f929215ff217ca2d7ed53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/8] [analyzer][clangsa] Add new option to

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-09-29 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-09-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/67663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-09-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/67663 **This PR is a continuation of the Phabricator review https://reviews.llvm.org/D154603 ** The invalidation of pointer pointers returned by subsequent calls to genenv is suggested by the POSIX standard, but is

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-09-28 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. https://github.com/llvm/llvm-project/pull/67157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-09-28 Thread Endre Fülöp via cfe-commits
gamesh411 wrote: | OpenSource Project name | New Reports | Reports Lost | Evaluation of reports | ||||| | memcached_1.6.8 | [New

[clang] 90c1f51 - [clang][analyzer] Fix empty enum handling in EnumCastOutOfRange checker

2023-08-09 Thread Endre Fülöp via cfe-commits
Author: Endre Fülöp Date: 2023-08-09T15:12:09+02:00 New Revision: 90c1f51c4b3e7a38a5e1b75de75d15757fc861e4 URL: https://github.com/llvm/llvm-project/commit/90c1f51c4b3e7a38a5e1b75de75d15757fc861e4 DIFF: https://github.com/llvm/llvm-project/commit/90c1f51c4b3e7a38a5e1b75de75d15757fc861e4.diff

  1   2   >