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 test): running test result in Expect correct EOF bytecode: Eip7702(InvalidLength) #9983

Open
2 tasks done
Cybourgeoisie opened this issue Feb 28, 2025 · 2 comments
Labels
Cmd-forge-test Command: forge test T-bug Type: bug T-to-investigate Type: to investigate

Comments

@Cybourgeoisie
Copy link

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.0.0-stable

What version of Foundryup are you on?

foundryup: 1.0.1

What command(s) is the bug in?

forge test

Operating System

macOS (Apple Silicon)

Describe the bug

Running forge test on this repo: https://github.com/limitbreakinc/creator-token-standards

Receive the following error in the middle of tests:

The application panicked (crashed).
Message:  Expect correct EOF bytecode: Eip7702(InvalidLength)
Location: /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-primitives-15.1.0/src/bytecode.rs:96

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

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 9 frames hidden ⋮                               
  10: <T as foundry_cheatcodes::DynCheatcode>::dyn_apply::h54fd5cb6eea113c8
      at <unknown source file>:<unknown line>
  11: <foundry_evm::inspectors::stack::InspectorStackRefMut as revm::inspector::Inspector<&mut dyn foundry_evm_core::backend::DatabaseExt+Error = foundry_fork_db::error::DatabaseError>>::call::he33382ea89e171bd
      at <unknown source file>:<unknown line>
  12: revm::inspector::handler_register::inspector_handle_register::{{closure}}::h780e91ef614888dc
      at <unknown source file>:<unknown line>
  13: revm::evm::Evm<EXT,DB>::transact::h5b51eaa865d0b725
      at <unknown source file>:<unknown line>
  14: foundry_evm::executors::Executor::call_with_env::h4344b805b9ece64c
      at <unknown source file>:<unknown line>
  15: proptest::test_runner::runner::call_test::hd0b7a5164d511ac6
      at <unknown source file>:<unknown line>
  16: proptest::test_runner::runner::TestRunner::gen_and_run_case::h60c5fdadf8d45d46
      at <unknown source file>:<unknown line>
  17: proptest::test_runner::runner::TestRunner::run_in_process::h3815885124d49eed
      at <unknown source file>:<unknown line>
  18: foundry_evm::executors::fuzz::FuzzedExecutor::fuzz::hc30fbcaee70213df
      at <unknown source file>:<unknown line>
  19: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &F>::call_mut::hf6cb00dc286a2e48
      at <unknown source file>:<unknown line>
  20: rayon::iter::plumbing::bridge_producer_consumer::helper::h8914966bb9957c06
      at <unknown source file>:<unknown line>
  21: rayon_core::join::join_context::{{closure}}::hf2eb8f55c97e106c
      at <unknown source file>:<unknown line>
  22: rayon::iter::plumbing::bridge_producer_consumer::helper::h8914966bb9957c06
      at <unknown source file>:<unknown line>
  23: rayon_core::join::join_context::{{closure}}::hf2eb8f55c97e106c
      at <unknown source file>:<unknown line>
  24: rayon::iter::plumbing::bridge_producer_consumer::helper::h8914966bb9957c06
      at <unknown source file>:<unknown line>
  25: rayon_core::join::join_context::{{closure}}::hf2eb8f55c97e106c
      at <unknown source file>:<unknown line>
  26: rayon::iter::plumbing::bridge_producer_consumer::helper::h8914966bb9957c06
      at <unknown source file>:<unknown line>
  27: rayon_core::join::join_context::{{closure}}::hf2eb8f55c97e106c
      at <unknown source file>:<unknown line>
  28: rayon::iter::plumbing::bridge_producer_consumer::helper::h8914966bb9957c06
      at <unknown source file>:<unknown line>
  29: forge::runner::ContractRunner::run_tests::h8ddc0c30cd002309
      at <unknown source file>:<unknown line>
  30: forge::multi_runner::MultiContractRunner::run_test_suite::h46fe9c2c914798c9
      at <unknown source file>:<unknown line>
  31: rayon::iter::plumbing::bridge_producer_consumer::helper::h0d65e176aaad8876
      at <unknown source file>:<unknown line>
  32: rayon_core::join::join_context::{{closure}}::he330cc24db44cdc0
      at <unknown source file>:<unknown line>
  33: rayon::iter::plumbing::bridge_producer_consumer::helper::h0d65e176aaad8876
      at <unknown source file>:<unknown line>
  34: rayon_core::join::join_context::{{closure}}::he330cc24db44cdc0
      at <unknown source file>:<unknown line>
  35: rayon::iter::plumbing::bridge_producer_consumer::helper::h0d65e176aaad8876
      at <unknown source file>:<unknown line>
  36: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::h3d066643491ead86
      at <unknown source file>:<unknown line>
  37: rayon_core::registry::WorkerThread::wait_until_cold::hc74aa13f6425c769
      at <unknown source file>:<unknown line>
  38: rayon_core::registry::ThreadBuilder::run::hab37af99b7318e9b
      at <unknown source file>:<unknown line>
  39: std::sys::backtrace::__rust_begin_short_backtrace::h8da0ab7912dbbadd
      at <unknown source file>:<unknown line>
  40: core::ops::function::FnOnce::call_once{{vtable.shim}}::h1382fb5c5bef62e6
      at <unknown source file>:<unknown line>
  41: std::sys::pal::unix::thread::Thread::new::thread_start::h4c442fe9db4e4c3f
      at <unknown source file>:<unknown line>
  42: __pthread_joiner_wake<unknown>
      at <unknown source file>:<unknown line>
@Cybourgeoisie Cybourgeoisie added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Feb 28, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Feb 28, 2025
@zerosnacks zerosnacks added the T-to-investigate Type: to investigate label Mar 3, 2025
@zerosnacks
Copy link
Member

zerosnacks commented Mar 3, 2025

Hi @Cybourgeoisie thanks for raising this - that is quite odd!

Have you been able to narrow it down to a single test or cheatcode?

Are you using Foundry's 7702 cheatcodes?

Related origin of error:

https://github.com/bluealloy/revm/blob/5886b9ed34b464d54568b32173cebd03dce8a622/crates/bytecode/src/eip7702.rs#L29-L50

@zerosnacks zerosnacks changed the title Expect correct EOF bytecode: Eip7702(InvalidLength) - Running forge test on Limit Break Creator Contracts bug(forge test): running test result in Expect correct EOF bytecode: Eip7702(InvalidLength) Mar 3, 2025
@zerosnacks zerosnacks added Cmd-forge-test Command: forge test and removed T-needs-triage Type: this issue needs to be labelled labels Mar 3, 2025
@Cybourgeoisie
Copy link
Author

I haven't been able to narrow it down to anything specific -- full disclosure, I'm not a member of the Limit Break team, but I found the error while trying to run their tests. I can ask if a member of the LB development team would be willing to help debug this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmd-forge-test Command: forge test T-bug Type: bug T-to-investigate Type: to investigate
Projects
Status: Todo
Development

No branches or pull requests

2 participants