Go to file
Devin Coughlin 683dfd3124 [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed.
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
2015-09-23 23:27:55 +00:00
clang [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed. 2015-09-23 23:27:55 +00:00
clang-tools-extra Fix loop-convert for trivially copyable types. 2015-09-23 22:28:14 +00:00
compiler-rt [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for make/platform/clang_darwin.mk in compiler_rt 2015-09-23 23:05:32 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Add sampler defines. 2015-09-21 14:59:58 +00:00
libcxx Fix Typo in GCC no RTTI detection. Fixes PR#24901. Thanks to Bernhard Rosenkraenzer for the report and the patch. 2015-09-22 21:58:30 +00:00
libcxxabi Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL. 2015-09-20 18:10:46 +00:00
libunwind unwind: cleanup -Wunused-parameter 2015-09-01 04:29:03 +00:00
lld Add support for relocating R_X86_64_GOTPCREL. 2015-09-23 20:08:25 +00:00
lldb Check existence of SIGHUP before using it 2015-09-23 21:53:18 +00:00
llgo [llgo] drop debug/DIBuilder.Declare 2015-09-01 11:52:37 +00:00
llvm [Unroll] When completely unrolling the loop, replace conditinal branches with unconditional. 2015-09-23 23:12:43 +00:00
openmp Update Reference.pdf files. 2015-09-23 18:09:47 +00:00
polly Make MIN_LOOP_TRIP_COUNT a static constant 2015-09-21 19:10:11 +00:00