-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Allocation overflow on abi.decode()
#4409
Comments
this is an evm panic ref https://soliditydeveloper.com/solidity-0.8 0x41
not sure if that's exposed in cli, if not we should |
Cheers. Indeed
Haven't found a way to increase the memory limit via CLI. |
unfamiliar with the internals but |
Updated the |
can you try with something ridiculous like 1GB? @rakita Under what circumstances is the memory limit in the evm actually violated? |
|
hmm, perhaps this is actually unrelated to the revm env setting @rakita? |
Do you mean this: https://github.com/bluealloy/revm/blob/main/crates/primitives/Cargo.toml#L60 |
this error is decoded from a revert/panic here Lines 117 to 118 in 13c1cf7
for
is this unrelated to the memory_limit setting? |
Nvm.. this error actually gets thrown when you try to decode something invalid (in my case, I forgot to add the last argument when ENCODING, so decoding was failing). Would have expected another error to pop, not a weird memory overflow error but.. such is life. sorry for wasting your time :( |
nice! good to know, thanks for sharing |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (b44b045 2023-02-21T00:22:41.521901Z)
What command(s) is the bug in?
forge test --optimize --vv
Operating System
macOS (Apple Silicon)
Describe the bug
I’m getting the error [FAIL. Reason: Memory allocation overflow] on one of my tests.
it happens when I run abi.decode() like so:
This code works just fine if I remove
reason
. It also works just fine if I removeuvs
and keepreason
.I get the same error if I interchange
reason
and put it betweenid
andchoice
(I thought maybe it had to do with two dynamic args being next to each other).The text was updated successfully, but these errors were encountered: