Skip to content
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

bug(forge): call_override to have same size as the number of (unsafe) external calls of the sequence #4245

Closed
2 tasks done
PaulRBerg opened this issue Feb 1, 2023 · 1 comment · Fixed by #7469
Closed
2 tasks done
Labels
A-fuzzing Area: fuzzing C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug

Comments

@PaulRBerg
Copy link
Contributor

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 (cd7850b 2023-02-01T00:04:58.420758Z)

What command(s) is the bug in?

forge test

Operating System

macOS (Apple Silicon)

Describe the bug

I enabled the call_override flag in the [invariant] section, and got this error:

The application panicked (crashed).
Message:  to have same size as the number of (unsafe) external calls of the sequence.
Location: evm/src/fuzz/invariant/call_override.rs:70

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[1]    44947 abort      forge t --mt invariant_

Unfortunately, I cannot link to my project, since it's in a private repository. But I do have many calls to external contracts.

@Philogy
Copy link

Philogy commented Mar 23, 2023

Getting a different error but that is also solely caused by flipping the call_override option to true:

The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: evm/src/fuzz/strategies/invariants.rs:36

This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[1]    480596 IOT instruction (core dumped)  forge test

To reproduce just clone this repo change call_override in foundry.toml to true and run forge test

@mds1 mds1 added A-fuzzing Area: fuzzing Cmd-forge-test Command: forge test C-forge Command: forge labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fuzzing Area: fuzzing C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants