[cfe-commits] r110471 - /cfe/trunk/lib/Checker/MallocChecker.cpp
Andrew McGregor
andrewmcgr at gmail.com
Fri Aug 6 20:25:22 PDT 2010
Thanks for that... this just reflects limited understanding of the compiler internal APIs on my part.
Andrew
On 7/08/2010, at 9:12 AM, Ted Kremenek wrote:
> Author: kremenek
> Date: Fri Aug 6 16:12:49 2010
> New Revision: 110471
>
> URL: http://llvm.org/viewvc/llvm-project?rev=110471&view=rev
> Log:
> Use 'GenerateNode()' instead of 'GenerateSink()' when reporting a leak. A leak is not a hard enough bug to stop analyzing a path.
>
> Modified:
> cfe/trunk/lib/Checker/MallocChecker.cpp
>
> Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=110471&r1=110470&r2=110471&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
> +++ cfe/trunk/lib/Checker/MallocChecker.cpp Fri Aug 6 16:12:49 2010
> @@ -650,9 +650,8 @@
> SymbolRef Sym = l.getLocSymbolInBase();
> if (Sym) {
> const RefState *RS = C.getState()->get<RegionState>(Sym);
> - if (RS)
> - if (RS->isReleased()) {
> - ExplodedNode *N = C.GenerateSink();
> + if (RS && RS->isReleased()) {
> + if (ExplodedNode *N = C.GenerateNode()) {
> if (!BT_UseFree)
> BT_UseFree = new BuiltinBug("Use dynamically allocated memory after"
> " it is freed.");
> @@ -661,6 +660,7 @@
> N);
> C.EmitReport(R);
> }
> + }
> }
> }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list