[analyzer] Anti-aliasing: different heap allocations do not alias
Add a concept of symbolic memory region belonging to heap memory space. When comparing symbolic regions allocated on the heap, assume that they do not alias. Use symbolic heap region to suppress a common false positive pattern in the malloc checker, in code that relies on malloc not returning the memory aliased to other malloc allocations, stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158136 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h 5 additions, 2 deletionsinclude/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
- include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h 6 additions, 0 deletions...ude/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
- lib/StaticAnalyzer/Checkers/MallocChecker.cpp 13 additions, 5 deletionslib/StaticAnalyzer/Checkers/MallocChecker.cpp
- lib/StaticAnalyzer/Core/MemRegion.cpp 4 additions, 0 deletionslib/StaticAnalyzer/Core/MemRegion.cpp
- lib/StaticAnalyzer/Core/SValBuilder.cpp 12 additions, 0 deletionslib/StaticAnalyzer/Core/SValBuilder.cpp
- lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp 23 additions, 20 deletionslib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
- test/Analysis/malloc.c 47 additions, 4 deletionstest/Analysis/malloc.c
Loading
Please register or sign in to comment