https://github.com/vidur2 closed
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
NagyDonat wrote:
> So is it best to close this PR?
Yes, I think this PR should be closed (because although it is a good approach
for fixing the bug, we have that other commit which is further along the same
path).
https://github.com/llvm/llvm-project/pull/155131
__
vidur2 wrote:
So is it best to close this PR?
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
NagyDonat wrote:
> Based on your review of the code do you have any suggestions on how I should
> go about tightening the heuristic?
Your code puts pointers (that were allocated by `new` or `new[]`) into a
relinquished state when they are passed to a constructor call. Currently this
is overly
vidur2 wrote:
Thanks! Based on your review of the code do you have any suggestions on how I
should go about tightening the heuristic?
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
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 HEAD~1 HEAD --extensions cpp --
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
vidur2 wrote:
> > Im sorry about messing up the naming convention, I havent contributed too
> > much to open source stuff.
>
> No harm done, this is part of the plan 🙂 Every contributor must learn these
> sometime and this time it was your turn to do so.
>
> I read the suggested code changes
@@ -3074,6 +3077,43 @@ void MallocChecker::checkPostCall(const CallEvent &Call,
(*PostFN)(this, C.getState(), Call, C);
return;
}
+
+ ProgramStateRef State = C.getState();
+
+ if (const auto *Ctor = dyn_cast(&Call)) {
+// Ensure we are constructing a concrete ob
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -218,3 +239,138 @@ void caller() {
(void)n;
} // no-warning: No potential memory leak here, because that's been already
reported.
} // namespace symbol_reaper_lifetime
+
+
+// Minimal RAII class that properly deletes its pointer.
+class Bar {
+public:
+ explicit Bar(int
@@ -3074,6 +3077,43 @@ void MallocChecker::checkPostCall(const CallEvent &Call,
(*PostFN)(this, C.getState(), Call, C);
return;
}
+
+ ProgramStateRef State = C.getState();
+
+ if (const auto *Ctor = dyn_cast(&Call)) {
+// Ensure we are constructing a concrete ob
https://github.com/NagyDonat commented:
> Im sorry about messing up the naming convention, I havent contributed too
> much to open source stuff.
No harm done, this is part of the plan :slightly_smiling_face: Every
contributor must learn these sometime and this time it was your turn to do so.
https://github.com/vidur2 updated
https://github.com/llvm/llvm-project/pull/155131
>From f903652135758b6a7a20d15565177304add16e2c Mon Sep 17 00:00:00 2001
From: vidur2
Date: Thu, 14 Aug 2025 17:28:36 -0400
Subject: [PATCH 1/4] initial malloc change check
---
.../StaticAnalyzer/Checkers/Malloc
vidur2 wrote:
Ok, I made the changes
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14,6 +14,8 @@
#include "Inputs/system-header-simulator-for-malloc.h"
+#include
steakhal wrote:
Yes, that should largely work.
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-
@@ -14,6 +14,8 @@
#include "Inputs/system-header-simulator-for-malloc.h"
+#include
vidur2 wrote:
Do you have any suggestions on how to do this? Should I just copy/paste the
necessary functionality from utility into the file? What is standard practice?
htt
vidur2 wrote:
Besides the regression test stuff, I should be ready for CR. Im sorry about the
naming convention, I havent contributed too much to open source stuff.
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-comm
https://github.com/vidur2 edited
https://github.com/llvm/llvm-project/pull/155131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
18 matches
Mail list logo