Szelethus wrote:
@steakhal, and especially @isuckatcs, I greatly appreciate the reviews! I
happen to have gotten some very ugrent task on my plate that drew away my
attention from this project. I will fix this PR up as soon as I'm done!
https://github.com/llvm/llvm-project/pull/113312
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/113312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -702,9 +702,17 @@ ProgramStateRef
CStringChecker::CheckOverlap(CheckerContext &C,
state->assume(svalBuilder.evalEQ(state, *firstLoc, *secondLoc));
if (stateTrue && !stateFalse) {
-// If the values are known to be equal, that's automatically an overlap.
-emi
@@ -579,8 +579,14 @@ ProgramStateRef
CStringChecker::CheckLocation(CheckerContext &C,
// These checks are either enabled by the CString out-of-bounds checker
// explicitly or implicitly by the Malloc checker.
// In the latter case we only do modeling but do not emi
https://github.com/steakhal commented:
I only reviewed this on my phone, but looks promising. I'll leave this PR for
the others to finish.
I agree with the direction.
https://github.com/llvm/llvm-project/pull/113312
___
cfe-commits mailing list
cfe-co
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/113312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -768,9 +776,17 @@ ProgramStateRef
CStringChecker::CheckOverlap(CheckerContext &C,
std::tie(stateTrue, stateFalse) = state->assume(*OverlapTest);
if (stateTrue && !stateFalse) {
-// Overlap!
-emitOverlapBug(C, stateTrue, First.Expression, Second.Expression);
-
@@ -614,10 +620,6 @@ CStringChecker::CheckBufferAccess(CheckerContext &C,
ProgramStateRef State,
if (!State)
return nullptr;
- // If out-of-bounds checking is turned off, skip the rest.
- if (!Filter.CheckCStringOutOfBounds)
-return State;
-
isuck
@@ -838,8 +860,15 @@ void
CStringChecker::emitUninitializedReadBug(CheckerContext &C,
void CStringChecker::emitOutOfBoundsBug(CheckerContext &C,
ProgramStateRef State, const Stmt *S,
StringRef Warn
@@ -768,9 +776,17 @@ ProgramStateRef
CStringChecker::CheckOverlap(CheckerContext &C,
std::tie(stateTrue, stateFalse) = state->assume(*OverlapTest);
if (stateTrue && !stateFalse) {
-// Overlap!
-emitOverlapBug(C, stateTrue, First.Expression, Second.Expression);
-
@@ -702,9 +702,17 @@ ProgramStateRef
CStringChecker::CheckOverlap(CheckerContext &C,
state->assume(svalBuilder.evalEQ(state, *firstLoc, *secondLoc));
if (stateTrue && !stateFalse) {
-// If the values are known to be equal, that's automatically an overlap.
-emi
@@ -579,8 +579,14 @@ ProgramStateRef
CStringChecker::CheckLocation(CheckerContext &C,
// These checks are either enabled by the CString out-of-bounds checker
// explicitly or implicitly by the Malloc checker.
// In the latter case we only do modeling but do not emi
https://github.com/isuckatcs edited
https://github.com/llvm/llvm-project/pull/113312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/isuckatcs commented:
Apart from a few nits and the question about seeing new warning with a certain
combination of checks, the patch looks good to me.
https://github.com/llvm/llvm-project/pull/113312
___
cfe-commits mailing list
cfe
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 181cc75ea8be70e3fa7145456e1bf2331e0bc5e4
306e0f0869582a9618f4c871200814c75bc34f56 --e
llvmbot wrote:
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Kristóf Umann (Szelethus)
Changes
It turns out, that some checks for cstring functions happened as a side effect
of other checks. For example, whether the arguments to memcpy were
uninitialized happened during buffer ove
https://github.com/Szelethus created
https://github.com/llvm/llvm-project/pull/113312
It turns out, that some checks for cstring functions happened as a side effect
of other checks. For example, whether the arguments to memcpy were
uninitialized happened during buffer overflow checking.
The w
17 matches
Mail list logo