This revision was automatically updated to reflect the committed changes.
Closed by commit rC335803: [analyzer] Use sufficiently large types for index
bounds calculation. (authored by dergachev, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D46944
Files:
lib/StaticAnalyzer/C
NoQ accepted this revision.
NoQ edited reviewers, added: NoQ; removed: dergachev.a.
NoQ added a comment.
Yep, this definitely looks safe and sound in the current shape.
I'm also very sorry for the lack of attention.
https://reviews.llvm.org/D46944
a.sidorin accepted this revision.
a.sidorin added a comment.
This revision is now accepted and ready to land.
Hi Bevin,
The patch looks good to me. But let's wait for maintainers to approve it. @NoQ
, could you take a look?
https://reviews.llvm.org/D46944
___
ebevhan added a comment.
Herald added a subscriber: mikhail.ramalho.
Ping.
https://reviews.llvm.org/D46944
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ebevhan updated this revision to Diff 149415.
ebevhan edited the summary of this revision.
ebevhan added a comment.
Changed ArrayIndexTy back to LongLongTy and reverted the test change.
https://reviews.llvm.org/D46944
Files:
lib/StaticAnalyzer/Core/ProgramState.cpp
lib/StaticAnalyzer/Core/R
a.sidorin added a subscriber: NoQ.
a.sidorin added a comment.
There are some results for clang and gcc max value for x86 and x64.
Source code:
const unsigned long long SIZE_MAX = (unsigned long long)(unsigned long)(-1);
const unsigned long long size = SIZE_MAX/2;
char arr[size+1];
Compiler
ebevhan added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89
SymMgr(context, BasicVals, alloc), MemMgr(context, alloc),
-StateMgr(stateMgr), ArrayIndexTy(context.LongLongTy),
+StateMgr(stateMgr), ArrayIndexTy
a.sidorin added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89
SymMgr(context, BasicVals, alloc), MemMgr(context, alloc),
-StateMgr(stateMgr), ArrayIndexTy(context.LongLongTy),
+StateMgr(stateMgr), ArrayIndex
ebevhan added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89
SymMgr(context, BasicVals, alloc), MemMgr(context, alloc),
-StateMgr(stateMgr), ArrayIndexTy(context.LongLongTy),
+StateMgr(stateMgr), ArrayIndexTy
a.sidorin added a comment.
Hi Bevin,
Could you please address these comments?
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:89
SymMgr(context, BasicVals, alloc), MemMgr(context, alloc),
-StateMgr(stateMgr), ArrayIndexTy(context.Long
ebevhan updated this revision to Diff 147738.
ebevhan edited the summary of this revision.
ebevhan added a comment.
Made ArrayIndexTy into ssize_t, consolidated the tests and fixed the test that
was failing.
https://reviews.llvm.org/D46944
Files:
include/clang/StaticAnalyzer/Core/PathSensiti
ebevhan added inline comments.
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1344
// This is a signed value, since it's used in arithmetic with signed indices.
- return svalBuilder.makeIntVal(RegionSize / EleSize, false);
+ return svalBuilder.makeIntVal(RegionSize / El
a.sidorin added inline comments.
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1344
// This is a signed value, since it's used in arithmetic with signed indices.
- return svalBuilder.makeIntVal(RegionSize / EleSize, false);
+ return svalBuilder.makeIntVal(RegionSize /
ebevhan added inline comments.
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1344
// This is a signed value, since it's used in arithmetic with signed indices.
- return svalBuilder.makeIntVal(RegionSize / EleSize, false);
+ return svalBuilder.makeIntVal(RegionSize / El
a.sidorin added inline comments.
Comment at: test/Analysis/array-index.c:11
+
+void fie() {
+ buf[SIZE-1] = 1;
Could you please give meaningful names to the tests?
Repository:
rC Clang
https://reviews.llvm.org/D46944
_
a.sidorin added a comment.
This is a nice extension of https://reviews.llvm.org/D16063.
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1344
// This is a signed value, since it's used in arithmetic with signed indices.
- return svalBuilder.makeIntVal(RegionSize / EleSiz
ebevhan created this revision.
ebevhan added reviewers: dergachev.a, dcoughlin.
Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun.
Herald added a reviewer: george.karpenkov.
RegionStoreManager::getSizeInElements used 'int' for size
calculations, and ProgramState::assumeInBound fe
17 matches
Mail list logo