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

Panic resulting from verbosity increased to 4 when using startDebugTraceRecording #9526

Closed
2 tasks done
NIC619 opened this issue Dec 10, 2024 · 0 comments · Fixed by #9529
Closed
2 tasks done

Panic resulting from verbosity increased to 4 when using startDebugTraceRecording #9526

NIC619 opened this issue Dec 10, 2024 · 0 comments · Fixed by #9529
Assignees
Labels
C-forge Command: forge T-bug Type: bug
Milestone

Comments

@NIC619
Copy link
Contributor

NIC619 commented Dec 10, 2024

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 (00efa0d 2024-12-09T00:29:01.805479000Z)

What command(s) is the bug in?

forge test

Operating System

None

Describe the bug

The erc4337-validation library leverages startDebugTraceRecording which requires increasing the verbosity to 3. (Otherwise you get vm.startDebugTraceRecording: no tracer initiated, consider adding -vvv flag error)

When setting verbosity to 3, it works fine. But when verbosity is increased to 4, it will panic.

To reproduce, clone the erc4337-validation repo, run installation and then run COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full forge test -vvvv and you will get:

Ran 1 test for test/SimulatorV060.t.sol:SimulatorTest
[PASS] testSimulate() (gas: 122480140)
The application panicked (crashed).
Message:  index out of bounds: the len is 0 but the index is 0
Location: /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-inspectors-0.12.0/src/tracing/writer.rs:368

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

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::h4ddc0ce1f8992182
      at <unknown source file>:<unknown line>
   2: color_eyre::config::PanicHook::panic_report::hc7aa2f7bb498c9df
      at <unknown source file>:<unknown line>
   3: color_eyre::config::PanicHook::into_panic_hook::{{closure}}::h18f6fa767a8f7306
      at <unknown source file>:<unknown line>
   4: std::panicking::rust_panic_with_hook::h7d795911432661cb
      at <unknown source file>:<unknown line>
   5: std::panicking::begin_panic_handler::{{closure}}::h36f15310ecbde379
      at <unknown source file>:<unknown line>
   6: std::sys::backtrace::__rust_end_short_backtrace::heed121414170e0c7
      at <unknown source file>:<unknown line>
   7: _rust_begin_unwind<unknown>
      at <unknown source file>:<unknown line>
   8: core::panicking::panic_fmt::h17b1b80ec02ffd19
      at <unknown source file>:<unknown line>
   9: core::panicking::panic_bounds_check::h4fa7ca60df78ab98
      at <unknown source file>:<unknown line>
  10: revm_inspectors::tracing::writer::TraceWriter<W>::write_item::h9399107519e55a99
      at <unknown source file>:<unknown line>
  11: revm_inspectors::tracing::writer::TraceWriter<W>::write_node::hf52c804d362b5862
      at <unknown source file>:<unknown line>
  12: foundry_evm_traces::render_trace_arena_inner::hf7e39f92a691b9d6
      at <unknown source file>:<unknown line>
  13: forge::cmd::test::TestArgs::run_tests::{{closure}}::h81ddeb39599de412
      at <unknown source file>:<unknown line>
  14: forge::cmd::test::TestArgs::execute_tests::{{closure}}::hce56e2656748be8b
      at <unknown source file>:<unknown line>
  15: <core::pin::Pin<P> as core::future::future::Future>::poll::h3f26e4953c979aa0
      at <unknown source file>:<unknown line>
  16: foundry_cli::utils::block_on::h906b11d502a1f7d4
      at <unknown source file>:<unknown line>
  17: forge::main::hdb8dabad718e6138
      at <unknown source file>:<unknown line>
  18: std::sys::backtrace::__rust_begin_short_backtrace::h5c1848c6eef4fc7c
      at <unknown source file>:<unknown line>
  19: _main<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
@NIC619 NIC619 added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Dec 10, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Dec 10, 2024
@grandizzy grandizzy added C-forge Command: forge and removed T-needs-triage Type: this issue needs to be labelled labels Dec 10, 2024
@grandizzy grandizzy added this to the v1.0.0 milestone Dec 10, 2024
@grandizzy grandizzy self-assigned this Dec 10, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Dec 10, 2024
@grandizzy grandizzy removed the status in Foundry Jan 6, 2025
@grandizzy grandizzy moved this to Completed in Foundry Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-bug Type: bug
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants