summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc-overflow.c
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed.Devin Coughlin2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ignores malloc-overflow bug in two cases: Case1: x = a/b; where n < b malloc (x*n); Then x*n will not overflow. Case2: x = a; // when 'a' is a known value. malloc (x*n); Also replaced isa with dyn_cast. Reject multiplication by zero cases in MallocOverflowSecurityChecker Currently MallocOverflowSecurityChecker does not catch cases like: malloc(n * 0 * sizeof(int)); This patch rejects such cases. Two test cases added. malloc-overflow2.c has an example inspired from a code in linux kernel where the current checker flags a warning while it should not. A patch by Aditya Kumar! Differential Revision: http://reviews.llvm.org/D9924 llvm-svn: 248446
* Fix analyzer tests.Ted Kremenek2012-08-241-1/+1
| | | | llvm-svn: 162588
* [analyzer] Remove target triple from the malloc overflow test.Anna Zaks2011-09-271-3/+2
| | | | llvm-svn: 140635
* [analyzer] rename all experimental checker packages to have 'experimental' ↵Ted Kremenek2011-08-031-1/+1
| | | | | | be the common root package. llvm-svn: 136835
* [analyzer] Introduce MallocOverflowSecurityChecker, a simple flow-sensitive ↵Ted Kremenek2011-08-031-0/+114
checker that may be useful for security auditing. This checker is currently too noisy to be on by default. llvm-svn: 136804
OpenPOWER on IntegriCloud