@@ -1022,6 +1022,23 @@ getStackOrCaptureRegionForDeclContext(const
LocationContext *LC,
return (const StackFrameContext *)nullptr;
}
+static bool isStdStreamVar(const VarDecl *D) {
balazske wrote:
The current code should filter this out. Still it is not su
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/147766
From f8dc303029c68762cdbd19b217730192d26f6fca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 9 Jul 2025 16:55:07 +0200
Subject: [PATCH 1/4] [clang][analyzer] Add C standard stream
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/149106
From ba535f818b36e5ab758b4148e46816e8f3ee6550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 2 Jul 2025 11:09:58 +0200
Subject: [PATCH 1/2] [clang][analyzer] Improve checker
'uni
@@ -2098,6 +2098,58 @@ Check the size argument passed into C string functions
for common erroneous patt
// warn: potential buffer overflow
}
+.. _unix-cstring-MissingTerminatingZero:
+
+unix.cstring.MissingTerminatingZero (C)
+"""
+Ch
@@ -0,0 +1,295 @@
+//=== MissingTerminatingZeroChecker.cpp -*- 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
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/147766
If variables `stdin`, `stdout`, `stderr` are added to the system memory space,
they are invalidated at any call to system (or C library) functions. These
variables are not expected to be changed by system func
https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/140913
___
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/138845
___
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/147766
From f8dc303029c68762cdbd19b217730192d26f6fca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 9 Jul 2025 16:55:07 +0200
Subject: [PATCH 1/2] [clang][analyzer] Add C standard stream
@@ -519,14 +519,53 @@ void reopen_std_stream(void) {
if (!fp) return;
stdout = fp; // Let's make them alias.
- clang_analyzer_eval(fp == oldStdout); // expected-warning {{UNKNOWN}}
- clang_analyzer_eval(fp == stdout);// expected-warning {{TRUE}}
no-FALSE
-
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/147766
From f8dc303029c68762cdbd19b217730192d26f6fca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Wed, 9 Jul 2025 16:55:07 +0200
Subject: [PATCH 1/3] [clang][analyzer] Add C standard stream
@@ -0,0 +1,295 @@
+//=== MissingTerminatingZeroChecker.cpp -*- 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,295 @@
+//=== MissingTerminatingZeroChecker.cpp -*- 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
https://github.com/balazske converted_to_draft
https://github.com/llvm/llvm-project/pull/146664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
balazske wrote:
Pointer escape and region changes are not handled yet.
https://github.com/llvm/llvm-project/pull/146664
___
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/136823
From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 17 Apr 2025 17:36:03 +0200
Subject: [PATCH 1/6] [clang-tidy] Add check
'bugprone-inva
https://github.com/balazske approved this pull request.
I think we can put in this change. I tested it on some projects, the number of
crashes got less after this change (it is possible that new ones appeared but
the total count was less).
https://github.com/llvm/llvm-project/pull/138838
_
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/140086
From 65d44a4eb9621e49a96f1ac43e5a1bbd6691dc13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Thu, 15 May 2025 17:41:16 +0200
Subject: [PATCH 1/9] [clang-tidy] Added check
'bugprone-fu
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/146664
A new checker for checking if terminating zero is missing from a string. There
is an existing `unix.cstring.NotNullTerminated` checker that looks similar but
checks just if a non-string like object is passed t
balazske wrote:
The two patches (#149106 and this) are a different solution for the problem. I
started the other because it looks more difficult to make this checker work if
memory invalidations happen, probably many cases should be handled to maintain
the checker internal data. The other solu
901 - 920 of 920 matches
Mail list logo