https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/79470
From 70eeae8170a782b93b546b81ac913e1b8eacd28e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 22 Feb 2024 10:18:06 +0100
Subject: [PATCH] [clang][analyzer] Fix argument invalidation
balazske wrote:
I have rebased the branch to latest version of `StreamChecker`, no other
changes were made to the patch.
https://github.com/llvm/llvm-project/pull/79470
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -763,6 +779,11 @@ void StreamChecker::evalFreadFwrite(const FnDescription
*Desc,
return;
}
+ // At read, invalidate the buffer in any case of error or success,
+ // except if EOF was already present.
+ if (IsFread && (OldSS->ErrorState != ErrorFEof))
+State =
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/79470
From 70eeae8170a782b93b546b81ac913e1b8eacd28e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 22 Feb 2024 10:18:06 +0100
Subject: [PATCH 1/2] [clang][analyzer] Fix argument invalida
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/79470
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/101836
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/107596
Checker was tested on 16 projects. The only results were the offset
calculations that were considered as valid (faulty) cases already.
https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run=vim_
balazske wrote:
> I'm not satisfied with the quality of the reports. The report refers to
> `Subtraction of two pointers that do not point into the same array is
> undefined behavior` without pointing out where the two pointers point to
> (and/or where are they declared, or set to point to dif
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/102580
At pointer subtraction only pointers are allowed that point into an array (or
one after the end), this fact was checker by the checker. This check is now
removed because it is a special case of array indexing
balazske wrote:
I uploaded now #102580 that removes the entire array bounds checking.
https://github.com/llvm/llvm-project/pull/102432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
The `ArrayBoundV2` checker needs some update to find all cases. For example
`(&x - 1) - &x` is not found, because the checker does only check
`ArraySubscriptExpr` (and others), not a `BinaryOperator` with pointer and
integer.
https://github.com/llvm/llvm-project/pull/102580
__
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/102580
From 08367f06167d8b12ee4de06a37915decd1e754e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 9 Aug 2024 09:31:55 +0200
Subject: [PATCH 1/2] [clang][analyzer] Remove array bounds c
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/102636
None
From 11e871ab17c119c71b8ef4bbcd3b186ec0e9a14f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 9 Aug 2024 17:41:46 +0200
Subject: [PATCH] [clang][analyzer] Bring checker alpha
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/102580
From 08367f06167d8b12ee4de06a37915decd1e754e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 9 Aug 2024 09:31:55 +0200
Subject: [PATCH 1/3] [clang][analyzer] Remove array bounds c
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/102580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/101836
From 2e98fc222566c5e746ade4ccaba23de3b59e0a5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Sat, 3 Aug 2024 18:10:34 +0200
Subject: [PATCH 1/2] [clang][ASTImporter] New fix for defaul
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/87322
From 79bbe640c0d60744f484db9965865455b0b15246 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 2 Apr 2024 09:59:48 +0200
Subject: [PATCH 1/3] [clang][analyzer] Add "pedantic" mode to
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/87322
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske commented:
It looks relatively good, I found only smaller issues.
https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc,
const CallEvent &Call,
C.addTransition(State);
}
+static std::optional getPointeeType(const MemRegion *R) {
+ if (!R)
+return std::nullopt;
+ if (const auto *ER = dyn_cast(R))
+return ER-
@@ -0,0 +1,412 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,412 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc,
const CallEvent &Call,
C.addTransition(State);
}
+static std::optional getPointeeType(const MemRegion *R) {
+ if (!R)
+return std::nullopt;
+ if (const auto *ER = dyn_cast(R))
+return ER-
@@ -0,0 +1,412 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,412 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,412 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/93676
From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May 2024 14:28:43 +0200
Subject: [PATCH 1/4] [clang][analyzer] Improved PointerSubCh
@@ -0,0 +1,443 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,443 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,443 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,116 @@
+//===--*- C++
-*--//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,443 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
@@ -0,0 +1,443 @@
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -triple x86_64-linux-gnu \
+// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
+// RUN: -analyzer-checker=debug.ExprInspection
+
+#include "Inputs/system-header-simulator-for-simple-stream.h"
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/93676
From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May 2024 14:28:43 +0200
Subject: [PATCH 1/5] [clang][analyzer] Improved PointerSubCh
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/93676
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/95003
The checker was renamed at some time ago but the documentation was not updated.
The section is now just moved and renamed. The documentation is still very
simple and needs improvement.
From 6bcef3384ed986447b1
@@ -0,0 +1,179 @@
+// RUN: %clang_analyze_cc1 -verify %s -analyzer-output=text \
+// RUN: -analyzer-checker=core \
+// RUN: -analyzer-checker=unix.Stream
balazske wrote:
This file can have a better name (like "stream-notes-missing-close.cpp").
https://github
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/94957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske commented:
I did not find big issues. But a description could be added to the
`NoOwnershipChangeVisitor` to explain what it does, and to `StreamChecker` for
what is it used. I did not find a similar test for `MallocChecker` but there
could be one with similar test f
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator {
} // end anonymous namespace
+//===--===//
+// Definition of NoStreamStateChangeVisitor.
+//===--
@@ -696,6 +732,69 @@ struct StreamOperationEvaluator {
} // end anonymous namespace
+//===--===//
+// Definition of NoStreamStateChangeVisitor.
+//===--
https://github.com/balazske approved this pull request.
It looks now OK at least to my knowledge.
https://github.com/llvm/llvm-project/pull/93408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
balazske wrote:
It should be possible in `StreamChecker` to perform the invalidations even if
the `StreamState` is not found (stream was not opened). Another possible
solution is that a generic invalidation support is added to
`StdLibraryFunctionsChecker` that can be used for stream related an
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
balazske wrote:
I did not get crash with this script and latest clang. Probably there is a
difference in the used system headers (`iostream` and `string` is included)?
https://github.com/llvm/llvm-project/pull/87144
___
cfe-commits mailing list
cfe-co
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/95899
Notes are added to indicate the array declarations of the arrays in a found
invalid pointer subtraction.
From 1eb6e7ebde0e97e1cd077dc27ffd3ebd6ed0e93d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3
balazske wrote:
I found difficult results from the checker where it is not obvious what the
problem is.
One type is this case where a negative index is found (any of these results, or
check the first one):
https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run=curl_curl-7_66_0_p
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/95899
From 1eb6e7ebde0e97e1cd077dc27ffd3ebd6ed0e93d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 18 Jun 2024 10:09:24 +0200
Subject: [PATCH 1/2] [clang][analyzer] Add notes to PointerS
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/95899
From 1eb6e7ebde0e97e1cd077dc27ffd3ebd6ed0e93d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 18 Jun 2024 10:09:24 +0200
Subject: [PATCH 1/3] [clang][analyzer] Add notes to PointerS
@@ -144,9 +144,24 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator
*B,
// Allow arithmetic on different symbolic regions.
if (isa(SuperLR) || isa(SuperRR))
return;
+if (const auto *SuperDLR = dyn_cast(SuperLR))
+ DiffDeclL = SuperDLR->getDecl
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/95899
From 1eb6e7ebde0e97e1cd077dc27ffd3ebd6ed0e93d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 18 Jun 2024 10:09:24 +0200
Subject: [PATCH 1/4] [clang][analyzer] Add notes to PointerS
balazske wrote:
> > I did not find a similar test for `MallocChecker` but there could be one
> > with similar test functions.
>
> I'm not sure what tests you are referring to. I did fix your other
> observations.
I meant another test file where the `NoStateChangeFuncVisitor` is tested (if
the
https://github.com/balazske approved this pull request.
At least the `StreamChecker` part looks correct, Probably we can test on the
opensource projects if there appear too many bad results (but probably not many
resource leak cases are found).
https://github.com/llvm/llvm-project/pull/94957
_
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/95003
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/96295
None
From 0c57ad1ca36a841dff700eb98f878475e0243b88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 21 Jun 2024 12:13:02 +0200
Subject: [PATCH] [clang][analyzer] Improve documentati
balazske wrote:
I have not enough resources to create a reproducer and it is not trivial, so I
would merge this change now.
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/96295
From 0c57ad1ca36a841dff700eb98f878475e0243b88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Fri, 21 Jun 2024 12:13:02 +0200
Subject: [PATCH 1/2] [clang][analyzer] Improve documentation
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/93676
The checker is made more exact (only pointer into array is allowed) and more
tests are added.
From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Da
@@ -44,24 +44,30 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator
*B,
const MemRegion *LR = LV.getAsRegion();
const MemRegion *RR = RV.getAsRegion();
-
- if (!(LR && RR))
-return;
-
- const MemRegion *BaseLR = LR->getBaseRegion();
- const MemRegion *Bas
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/93676
From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May 2024 14:28:43 +0200
Subject: [PATCH 1/2] [clang][analyzer] Improved PointerSubCh
@@ -0,0 +1,74 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.core.PointerSub -verify %s
+
+void f1(void) {
+ int x, y, z[10];
+ int d = &y - &x; // expected-warning{{Subtraction of two pointers that do
not point into the same array is undefined behavior}}
+ d = z - &y;
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/93676
From a896030e71d09ebe7239d6fab343606918ee4c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May 2024 14:28:43 +0200
Subject: [PATCH 1/3] [clang][analyzer] Improved PointerSubCh
balazske wrote:
With the current version I have the following observations:
- There is a warning for `(&x + 1) - &x` and `(&x - 1) - &x`. Should this be
fixed?
- The code `(int *)((char *)(&a[4]) + sizeof(int)) - &a[4]` produces no warning
but `(int *)((char *)(&a[4]) + 1) - &a[4]` produces wa
https://github.com/balazske commented:
Does this work on the following code?
```
struct A {
enum { E1,E2 } x;
enum { E3,E4 } y;
};
```
https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9674,6 +9674,27 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+TEST_P(ASTImporterOptionSpecificTestBase, ImportAnonymousEnum) {
+ const char *ToCode =
+ R"(
+
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/93980
Checker alpha.security.PutenvStackArray is moved to security.PutenvStackArray.
From 033c7c2187f4dcbd050c69c5279ae2dcfe02c529 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May
balazske wrote:
I found [this
one](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=memcached_1.6.8_baseline&is-unique=off&diff-type=New&checker-name=alpha.security.PutenvStackArray&report-hash=8c8c23edbd58c25757a51f22d1a10a5a&report-id=5484388&report-filepath=%2Floca
@@ -1179,6 +1179,41 @@ security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C)
strncpy(buf, "a", 1); // warn
}
+.. _security-putenv-stack-array:
+
+security.PutenvStackArray (C)
+"
+Finds calls to the ``putenv`` function which pass a pointer t
@@ -1179,6 +1179,41 @@ security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C)
strncpy(buf, "a", 1); // warn
}
+.. _security-putenv-stack-array:
+
+security.PutenvStackArray (C)
+"
+Finds calls to the ``putenv`` function which pass a pointer t
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/93980
From 033c7c2187f4dcbd050c69c5279ae2dcfe02c529 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 29 May 2024 16:47:42 +0200
Subject: [PATCH 1/2] [clang][analyzer] Move PutenvStackArray
https://github.com/balazske edited
https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9674,6 +9674,40 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+AST_MATCHER_P(EnumDecl, hasEnumConstName, StringRef, ConstName) {
+ for (EnumConstantDecl *D : Node.
@@ -9674,6 +9674,40 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+AST_MATCHER_P(EnumDecl, hasEnumConstName, StringRef, ConstName) {
+ for (EnumConstantDecl *D : Node.
https://github.com/balazske commented:
The change looks good, only the test can be made more exact.
https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
@@ -0,0 +1,74 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.core.PointerSub -verify %s
+
+void f1(void) {
+ int x, y, z[10];
+ int d = &y - &x; // expected-warning{{Subtraction of two pointers that do
not point into the same array is undefined behavior}}
+ d = z - &y;
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/93980
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske approved this pull request.
https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/89247
None
From 7138f026e845ebb4f1a3e6a86bdeb534d666ae7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 18 Apr 2024 16:40:03 +0200
Subject: [PATCH] [clang][analyzer] Move StreamChecker
balazske wrote:
The checker is usable enough to move to non-alpha state.
This table contains some links to the results after the "Pedantic" option was
added. The "new reports" are the ones that got removed if the option is turned
on. At some projects there are still many results, for example at
@@ -563,6 +563,20 @@ def MismatchedDeallocatorChecker :
Checker<"MismatchedDeallocator">,
Dependencies<[DynamicMemoryModeling]>,
Documentation;
+def StreamChecker : Checker<"Stream">,
+ HelpText<"Check stream handling functions">,
+ WeakDependencies<[NonNullParamChecker
@@ -910,8 +910,8 @@ Unix Alpha Checkers
-
-alpha.unix.Stream
+
+unix.Stream
balazske wrote:
Probably the checker must be removed entirely from this file?
https://github.com/llvm/llvm-project/pull/89247
___
cfe-co
@@ -48,7 +48,7 @@ Open Projects
(Difficulty: Medium)
- alpha.unix.StreamChecker
+ unix.StreamChecker
balazske wrote:
This section should be removed too. The problem is still not solved in the
mentioned way ("delayed split"). I do not s
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/89247
From 7138f026e845ebb4f1a3e6a86bdeb534d666ae7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 18 Apr 2024 16:40:03 +0200
Subject: [PATCH 1/2] [clang][analyzer] Move StreamChecker ou
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/89247
From 7138f026e845ebb4f1a3e6a86bdeb534d666ae7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 18 Apr 2024 16:40:03 +0200
Subject: [PATCH 1/3] [clang][analyzer] Move StreamChecker ou
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/89247
From 7138f026e845ebb4f1a3e6a86bdeb534d666ae7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 18 Apr 2024 16:40:03 +0200
Subject: [PATCH 1/4] [clang][analyzer] Move StreamChecker ou
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/100100
Default values of template parameters (non-type, type, template) were not
correctly handled in the "inherited" case. This occurs if the first declaration
contains the default value but a next one not. The defa
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/97078
From 1f04ce794a3aefc0f5622a9dea0a92a1e2b50be9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 25 Jun 2024 16:27:00 +0200
Subject: [PATCH 1/2] [clang][analyzer] MmapWriteExecChecker
balazske wrote:
Documentation of the checker could be updated with this new behavior.
https://github.com/llvm/llvm-project/pull/100085
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
I removed the options to specify `PROT_` values. These should not be needed
because detection from macro value should work in normal cases (probably this
functionality was not available when the options were added).
https://github.com/llvm/llvm-project/pull/97078
__
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/97078
From 1f04ce794a3aefc0f5622a9dea0a92a1e2b50be9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Tue, 25 Jun 2024 16:27:00 +0200
Subject: [PATCH 1/3] [clang][analyzer] MmapWriteExecChecker
@@ -1,13 +1,14 @@
// RUN: %clang_analyze_cc1 -triple i686-unknown-linux
-analyzer-checker=alpha.security.MmapWriteExec -analyzer-config
alpha.security.MmapWriteExec:MmapProtExec=1 -analyzer-config
alpha.security.MmapWriteExec:MmapProtRead=4
-DUSE_ALTERNATIVE_PROT_EXEC_DEFINIT
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/96501
From b431151f83fa2980e4a132191ccf5713ab69806b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 24 Jun 2024 16:48:54 +0200
Subject: [PATCH 1/2] [clang][analyzer] Improve PointerSubChe
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/97078
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske approved this pull request.
https://github.com/llvm/llvm-project/pull/100903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
In the state dump I see that `stdout` seems to be NULL (last line in
"constraints"). This explains why the `StateNull` becomes NULL, because call to
`assumeNoAliasingWithStdStreams` was called already. I think the better
solution is to check NULL-ness of the std stream variable
balazske wrote:
> Exactly. I didn't want to rush too much, but I can share that my current idea
> is to call `assumeNoAliasingWithStdStreams` only on the success path.
This can be a better (and more simple) solution.
https://github.com/llvm/llvm-project/pull/100901
501 - 600 of 829 matches
Mail list logo