diff options
| author | Anna Zaks <ganna@apple.com> | 2013-02-07 23:05:47 +0000 |
|---|---|---|
| committer | Anna Zaks <ganna@apple.com> | 2013-02-07 23:05:47 +0000 |
| commit | c89ad07d39a435a4069f890417747487f4b3abbf (patch) | |
| tree | 802d570dd3c71cb8526b933cdeca91435b61c515 /llvm/tools/llvm-readobj/llvm-readobj.cpp | |
| parent | acdc13cb00591e2ab2b168c7924d7eb57fa4808e (diff) | |
| download | llvm-c89ad07d39a435a4069f890417747487f4b3abbf.zip llvm-c89ad07d39a435a4069f890417747487f4b3abbf.tar.gz llvm-c89ad07d39a435a4069f890417747487f4b3abbf.tar.bz2 | |
[analyzer] Report bugs when freeing memory with offset pointer
The malloc checker will now catch the case when a previously malloc'ed
region is freed, but the pointer passed to free does not point to the
start of the allocated memory. For example:
int *p1 = malloc(sizeof(int));
p1++;
free(p1); // warn
From the "memory.LeakPtrValChanged enhancement to unix.Malloc" entry
in the list of potential checkers.
A patch by Branden Archer!
llvm-svn: 174678
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions
