foundry: Bug: `memory allocation of 9223372036854775807 bytes failed`

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (7545c7a 2024-03-12T00:16:54.294788023Z)

What command(s) is the bug in?

forge test

Operating System

Linux

Describe the bug

See CI run here:

memory allocation of 9223372036854775807 bytes failed
Aborted (core dumped)
 ELIFECYCLE  Test failed. See above for more details.
Error: Process completed with exit code 1.

I haven’t changed the tests for 3 months, except for that PR https://github.com/pcaversaccio/createx/pull/90 which raises now with that error.

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

What would you identify as the largest fuzz/invariant tests in the code base? Might be worth trying to narrow down if it’s one of the generators We should probably log the fuzz seed so this is more easily reproducible

https://github.com/pcaversaccio/createx/blob/main/foundry.toml#L21

10_000 for fuzz and 5_000 for invariant tests

I tried reproduce the bug locally using these params but no luck. Maybe it’s just a crazy weird edge case tbh, idk. If you think it’s too hard to figure out the issue with the limited data we have, I can close it and reopen again later if I face it again? Thoughts?

the error looks like a classic allocate capacity with underflow error, but I was unable to identify where

Still running locally to see if I can reproduce. This so weird really. Merged my PR in the meantime and you know what, it fucking passed: https://github.com/pcaversaccio/createx/actions/runs/8252329302/job/22571561906. I HATE SOFTWARE 😃

the error looks like a classic allocate capacity with underflow error, but I was unable to identify where