We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b2679a commit d514606Copy full SHA for d514606
test/utils/Memory.t.sol
@@ -8,7 +8,11 @@ import {Memory} from "@openzeppelin/contracts/utils/Memory.sol";
8
contract MemoryTest is Test {
9
using Memory for *;
10
11
- function testSymbolicGetSetFreePointer(bytes32 ptr) public {
+ function testSymbolicGetSetFreePointer(uint256 seed) public pure {
12
+ // - first 0x80 bytes are reserved (scratch + FMP + zero)
13
+ // - moving the free memory pointer to far causes OOG errors
14
+ bytes32 ptr = bytes32(bound(seed, 0x80, type(uint24).max));
15
+
16
Memory.setFreePointer(ptr.asPointer());
17
assertEq(Memory.getFreePointer().asBytes32(), ptr);
18
}
0 commit comments