| commit | b206e2ea7775db49cd2a0b21f64c792b2b9e1ec7 | [log] [tgz] |
|---|---|---|
| author | Devin Coughlin <dcoughlin@apple.com> | Fri Dec 16 18:41:40 2016 +0000 |
| committer | Devin Coughlin <dcoughlin@apple.com> | Fri Dec 16 18:41:40 2016 +0000 |
| tree | 271dbda8272ae656abe355a51bc64ae898bd67f8 | |
| parent | 7c595b6e32a15db71e28cd65408a8b90f35302cf [diff] [blame] |
[analyzer] Fix crash in MallocChecker. Fix a crash in the MallocChecker when the extent size for the argument to new[] is not known. A patch by Abramo Bagnara and Dániel Krupp! https://reviews.llvm.org/D27849 Differential Revision: https://reviews.llvm.org/D27849 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289970 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/out-of-bounds-new.cpp b/test/Analysis/out-of-bounds-new.cpp index 41ecbee..ee7bb1e 100644 --- a/test/Analysis/out-of-bounds-new.cpp +++ b/test/Analysis/out-of-bounds-new.cpp
@@ -148,3 +148,9 @@ int *buf = new int[s]; buf[0] = 1; // no-warning } +//Tests complex arithmetic +//in new expression +void test_dynamic_size2(unsigned m,unsigned n){ + unsigned *U = nullptr; + U = new unsigned[m + n + 1]; +}