Commit f021195
committed
Fix operator precedence in StackLimitEvader memory guard assertion
Add parentheses so the reservedMemory and requiredSlots bounds correctly evaluate
to 2^32. Without them, 'u256(1) << 32 - 1' is parsed as 'u256(1) << (32 - 1)' = 2^31
due to C++ operator precedence. Use '(u256(1) << 32)' and '(uint64_t(1) << 32)' for
clearer semantics that allow the full 32-bit range [0, 2^32-1].1 parent 4e281a7 commit f021195
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
0 commit comments