Skip to content

Keep getting segfaults on anvil #5754

@mike-code

Description

@mike-code

Component

Anvil

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

anvil 0.2.0 (c976619 2023-08-30T16:41:30.798064692Z)

What command(s) is the bug in?

anvil --chain-id 1337

Operating System

Linux amd64

Describe the bug

I'm trying to deploy a contract using hardhat (HardhatRuntimeEnvironment.deployments.deploy()), but every time I try to run the deployment, anvil segfaults. Those contracts work just fine on mainnet/goerli/sepolia.

platform: linux amd64
I've tried nightly (0.2.0) as well as nightly from August, 1 (0.1.0), but I keep getting the same error.
I've tried both pre-built assets as well as compiling anvil myself.

Listening on 127.0.0.1:8545
eth_chainId
eth_chainId
eth_accounts
eth_accounts
eth_chainId
eth_chainId
eth_blockNumber
eth_chainId
eth_chainId
eth_estimateGas
eth_chainId
eth_getTransactionCount
eth_blockNumber
eth_chainId
eth_getBlockByNumber
eth_feeHistory
eth_sendTransaction
thread 'tokio-runtime-worker' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memory-db-0.29.0/src/malloc_size_of.rs:68:9:
attempt to add with overflow
stack backtrace:
   0:     0x55e8d179419c - <unknown>
   1:     0x55e8d17bfddc - <unknown>
   2:     0x55e8d179035e - <unknown>
   3:     0x55e8d1793f84 - <unknown>
   4:     0x55e8d179550a - <unknown>
   5:     0x55e8d17951f7 - <unknown>
   6:     0x55e8d1795b0b - <unknown>
   7:     0x55e8d17959c1 - <unknown>
   8:     0x55e8d17946c6 - <unknown>
   9:     0x55e8d1795752 - <unknown>
  10:     0x55e8d0a27c93 - <unknown>
  11:     0x55e8d0a27d23 - <unknown>
  12:     0x55e8d0bd5856 - <unknown>
  13:     0x55e8d0bd5064 - <unknown>
  14:     0x55e8d0bbce50 - <unknown>
  15:     0x55e8d0bd121e - <unknown>
  16:     0x55e8d0bd5c53 - <unknown>
  17:     0x55e8d0bbc577 - <unknown>
  18:     0x55e8d0bc1be5 - <unknown>
  19:     0x55e8d0b66191 - <unknown>
zsh: IOT instruction (core dumped)  anvil --chain-id 1337

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions