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

11 lines
307 B
Solidity
Raw Normal View History

2021-03-23 18:15:14 +00:00
contract C {
uint[] a;
function r(uint i) public view returns (uint) {
return a[i]; // 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 6368: (82-86): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\n = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r(0)