solidity/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_2.sol
Martin Blicha cdfc19b503 SMTChecker: Bring back counterexample checks in regression tests
Since the default is now to ignore the counterexamples when checking
test output, we bring back counterexample checks in tests where the
counterexample is (mostly) deterministic.
2023-07-25 12:26:21 +02:00

11 lines
323 B
Solidity

contract C {
function r(bytes4 x, uint y) public pure returns (bytes1) {
return x[y]; // oob access
}
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6368: (83-87): CHC: Out of bounds access happens here.\nCounterexample:\n\nx = 0x0\ny = 4\n = 0x0\n\nTransaction trace:\nC.constructor()\nC.r(0x0, 4)