solidity/test/libsolidity/smtCheckerTests/out_of_bounds/array_2d_4.sol

28 lines
1.4 KiB
Solidity
Raw Normal View History

2021-03-23 18:15:14 +00:00
contract C {
uint[][] a;
function p() public { a.push(); }
function q(uint i) public {
require(i < a.length);
a[i].push();
}
function r() public view {
for (uint i = 0; i < a.length + 10; ++i)
for (uint j = 0; j < a[i].length + 20; ++j)
a[i][j]; // oob access
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
2021-03-23 18:15:14 +00:00
// ----
2021-03-31 15:11:54 +00:00
// Warning 4984: (184-197): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
2021-08-20 16:47:30 +00:00
// Warning 4984: (199-202): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
2023-02-09 16:07:13 +00:00
// Warning 6368: (228-232): CHC: Out of bounds access happens here.
2021-03-31 15:11:54 +00:00
// Warning 4984: (228-244): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
2021-08-20 16:47:30 +00:00
// Warning 4984: (246-249): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
2023-02-09 16:07:13 +00:00
// Warning 6368: (255-259): CHC: Out of bounds access happens here.
2022-11-23 15:51:06 +00:00
// Warning 6368: (255-262): CHC: Out of bounds access happens here.
2023-02-09 16:07:13 +00:00
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
2021-03-31 15:11:54 +00:00
// Warning 2661: (184-197): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 2661: (228-244): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
// Info 6002: BMC: 4 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.