Skip to content

Commit 5e1d557

Browse files
author
kroening
committed
Simplifier does not modify out-of-bounds access
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@6390 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
1 parent 93c28b3 commit 5e1d557

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/solvers/flattening/boolbv_index.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ void boolbvt::convert_index(
339339
offset+width<=mp_integer(tmp.size()))
340340
{
341341
// in bounds
342+
343+
// Expression simplification should remove these cases
344+
assert(array.id()!=ID_array_of &&
345+
array.id()!=ID_array);
346+
// If not there are large improvements possible as above
347+
342348
for(unsigned i=0; i<width; i++)
343349
bv[i]=tmp[integer2long(offset+i)];
344350
}

0 commit comments

Comments
 (0)