summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc-annotations.c
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Malloc: Warn about use-after-free when memory ownership wasAnna Zaks2012-06-221-2/+1
| | | | | | transfered with dataWithBytesNoCopy. llvm-svn: 158958
* [analyzer] Malloc: cleanup, disallow free on relinquished memory.Anna Zaks2012-06-201-3/+3
| | | | | | | | This commits sets the grounds for more aggressive use after free checking. We will use the Relinquished sate to denote that someone else is now responsible for releasing the memory. llvm-svn: 158850
* [analyzer] Malloc: Utter the name of the leaked variable.Anna Zaks2012-03-211-4/+4
| | | | | | | | | | | | | | | Specifically, we use the last store of the leaked symbol in the leak diagnostic. (No support for struct fields since the malloc checker doesn't track those yet.) + Infrastructure to track the regions used in store evaluations. This approach is more precise than iterating the store to obtain the region bound to the symbol, which is used in RetainCount checker. The region corresponds to what is uttered in the code in the last store and we do not rely on the store implementation to support this functionality. llvm-svn: 153212
* [analyzer] Fix a regression introduced in malloc withAnna Zaks2012-03-011-0/+9
| | | | | | | | | | attributes, introduced in r151188. + the test to catch it. Thanks to Ahmed Charles for pointing this out. llvm-svn: 151840
* [analyzer] Malloc Checker: Clean up bug naming:Anna Zaks2012-02-161-13/+13
| | | | | | | - Rename the category "Logic Error" -> "Memory Error". - Shorten all the messages. llvm-svn: 150733
* [analyzer] Malloc Checker: Give up when a pointer escapes into a struct.Anna Zaks2012-02-161-1/+2
| | | | | | | | We are not properly handling the memory regions that escape into struct fields, which led to a bunch of false positives. Be conservative here and give up when a pointer escapes into a struct. llvm-svn: 150658
* [analyzer] Malloc Checker: Report a leak when we are returning freedAnna Zaks2012-02-111-3/+1
| | | | | | | | | memory. (As per one test case, the existing checker thought that this could cause a lot of false positives - not sure if that's valid, to be verified.) llvm-svn: 150313
* [analyzer] MallocChecker Cleanup - harden against crashes, fix an errorAnna Zaks2012-02-101-2/+2
| | | | | | (use of return instead of continue), wording. llvm-svn: 150215
* [analyzer] Split the MallocChecker into two versions - pessimistic andAnna Zaks2012-02-081-0/+263
optimistic. TODO: actually implement the pessimistic version of the checker. Ex: it needs to assume that any function that takes a pointer might free it. The optimistic version relies on annotations to tell us which functions can free the pointer. llvm-svn: 150111
OpenPOWER on IntegriCloud