paritytech / paritytech/revive

ICE: polkavm-linker panics on debug info for a call-heavy function

Open
#574 1 comment 0 reactions 1 assignee View on GitHub

@elle-j is already working on this.

Since Jul 15, 2026.

Dominant language
Rust
Stars
102
Forks
26
Avg merge
1d 13h
Merged PRs (30d)
6

Description

MRE:

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.29;
interface I { function f(uint256) external; }
contract C {
  function run(I t, uint256 acc) external {
    t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc);
    t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc);
    t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc);
    t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc); t.f(acc);
  }
}

The panic is in the polkavm-linker sanity check gated on cfg!(debug_assertions), so it requires a debug build of resolc (its own test suite is one — the integration harness compiles with debug info at every opt level except -Oz):

$ resolc -g -O3 --bin ice.sol      # debug-built resolc
thread 'main' panicked at polkavm-linker-0.35.0/src/program_from_elf.rs:11099:62:
called `Result::unwrap()` on an `Err` value:
    ProgramParseError(Other("found a line program with too many instructions"))

Git commit: 066c6d26f0dea83410498c412e560757da44e355; LLVM 22.1.5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.