-
- Downloads
[analyzer] Add LocationContext information to SymbolMetadata.
Like SymbolConjured, SymbolMetadata also needs to be uniquely identified by the moment of its birth. Such moments are coded by the (Statement, LocationContext, Block count) triples. Each such triple represents the moment of analyzing a statement with a certain call backtrace, with corresponding CFG block having been entered a given amount of times during analysis of the current code body. The LocationContext information was accidentally omitted for SymbolMetadata, which leads to reincarnation of SymbolMetadata upon re-entering a code body with a different backtrace; the new symbol is incorrectly unified with the old symbol, which leads to unsound assumptions. Patch by Alexey Sidorin! Differential Revision: https://reviews.llvm.org/D21978 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278937 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h 5 additions, 3 deletions...ude/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
- include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h 12 additions, 6 deletions...e/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
- lib/StaticAnalyzer/Checkers/CStringChecker.cpp 1 addition, 0 deletionslib/StaticAnalyzer/Checkers/CStringChecker.cpp
- lib/StaticAnalyzer/Core/SValBuilder.cpp 2 additions, 1 deletionlib/StaticAnalyzer/Core/SValBuilder.cpp
- lib/StaticAnalyzer/Core/SymbolManager.cpp 4 additions, 3 deletionslib/StaticAnalyzer/Core/SymbolManager.cpp
- test/Analysis/string.c 17 additions, 0 deletionstest/Analysis/string.c
Loading
Please register or sign in to comment