<feed xmlns='http://www.w3.org/2005/Atom'>
<title>clang/lib/Analysis/MallocChecker.cpp, branch master</title>
<subtitle>Unofficial clang GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/'/>
<entry>
<title>Split libAnalysis into two libraries: libAnalysis and libChecker.</title>
<updated>2010-01-25T04:41:41+00:00</updated>
<author>
<name>Ted Kremenek</name>
<email>kremenek@apple.com</email>
</author>
<published>2010-01-25T04:41:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=1309f9a3b225ea846e5822691c39a77423125505'/>
<id>1309f9a3b225ea846e5822691c39a77423125505</id>
<content type='text'>
(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for computing size in elements for symbolic regions obtained from</title>
<updated>2010-01-18T08:54:31+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2010-01-18T08:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=3ed04d37573c566205d965d2e91d54ccae898d0a'/>
<id>3ed04d37573c566205d965d2e91d54ccae898d0a</id>
<content type='text'>
malloc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
malloc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>If the symbol has not been tracked, do not free it. This is possible when free</title>
<updated>2010-01-18T03:27:34+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2010-01-18T03:27:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=7e3cda9744204d19e0691bcb473cac1529b5fadd'/>
<id>7e3cda9744204d19e0691bcb473cac1529b5fadd</id>
<content type='text'>
is called on a pointer that does not get its value directly from malloc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93706 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
is called on a pointer that does not get its value directly from malloc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93706 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Let constraint manager inform checkers that some assumption logic has happend.</title>
<updated>2009-12-31T06:13:07+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2009-12-31T06:13:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=b94b81a9ab46c99b00c7ad28c5e1e212c63fc9ac'/>
<id>b94b81a9ab46c99b00c7ad28c5e1e212c63fc9ac</id>
<content type='text'>
Add new states for symbolic regions tracked by malloc checker. This enables us
to do malloc checking more accurately. See test case.

Based on Lei Zhang's patch and discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92342 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new states for symbolic regions tracked by malloc checker. This enables us
to do malloc checking more accurately. See test case.

Based on Lei Zhang's patch and discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92342 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add initial support for realloc() in MallocChecker.</title>
<updated>2009-12-12T12:29:38+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2009-12-12T12:29:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=d9c84c8381261530b16512d2aac146de8271ea1e'/>
<id>d9c84c8381261530b16512d2aac146de8271ea1e</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Completely evaluate malloc/free in MallocChecker.cpp.</title>
<updated>2009-12-11T03:09:01+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2009-12-11T03:09:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=a49c6b7da5684e061612de70b62fe892b67f35c4'/>
<id>a49c6b7da5684e061612de70b62fe892b67f35c4</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91100 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91100 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Use 'class' instead of 'struct'.</title>
<updated>2009-12-11T00:55:44+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2009-12-11T00:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=7fb1464c99c6e2f44ce9f41fd5de9edd15c1e45d'/>
<id>7fb1464c99c6e2f44ce9f41fd5de9edd15c1e45d</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91085 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91085 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace</title>
<updated>2009-11-28T06:07:30+00:00</updated>
<author>
<name>Kovarththanan Rajaratnam</name>
<email>kovarththanan.rajaratnam@gmail.com</email>
</author>
<published>2009-11-28T06:07:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=ba5fb5a955c896815c439289fc51c03cf0635129'/>
<id>ba5fb5a955c896815c439289fc51c03cf0635129</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90028 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90028 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up the Checker API a little more, resolving some hidden bugs</title>
<updated>2009-11-23T22:22:01+00:00</updated>
<author>
<name>Ted Kremenek</name>
<email>kremenek@apple.com</email>
</author>
<published>2009-11-23T22:22:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=19d67b52b73c04ef8eb663980330a1de2b47c845'/>
<id>19d67b52b73c04ef8eb663980330a1de2b47c845</id>
<content type='text'>
along the way.  Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions.  This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag.  Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time.  This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases.  We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly.  This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89707 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
along the way.  Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions.  This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag.  Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time.  This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases.  We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly.  This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89707 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Save and restore the HasGen flag in MallocChecker.</title>
<updated>2009-11-22T13:22:34+00:00</updated>
<author>
<name>Zhongxing Xu</name>
<email>xuzhongxing@gmail.com</email>
</author>
<published>2009-11-22T13:22:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=f605aae3227ffa3a5dae8eb34fdd79ba0a0d19d1'/>
<id>f605aae3227ffa3a5dae8eb34fdd79ba0a0d19d1</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
