The platform you are on (Windows, macOS, an M1 Mac or Windows)
Description: Ubuntu 22.04.1 LTS
Code snippets if this is happening in relation to testing or building code
I'm attaching a zip'ed project. The crashing contract is:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.6;
import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/console.sol";
contract ContractScript is Script {
function setUp() public {}
function run() public view {
console.log("Beginning run()");
}
}
Concrete steps to reproduce the bug
$ ./anvil.sh
$ RUST_BACKTRACE=full forge script script/CoreDump.sol --debug
[⠆] Compiling...
No files changed, compilation skipped
The application panicked (crashed).
Message: index out of bounds: the len is 0 but the index is 0
Location: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/revm-1.9.0/src/interpreter/contract.rs:149
This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __libc_start_call_main<unknown>
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
2: __libc_start_main_impl<unknown>
at ./csu/../csu/libc-start.c:392
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Aborted (core dumped)
I'm suddenly having trouble debugging my scripts -- forge crashes. It may have something to do with console.log.
Description: Ubuntu 22.04.1 LTS
I'm attaching a zip'ed project. The crashing contract is:
$ ./anvil.sh
forge-crash.zip