Skip to content

interrupt_poll isn't handled by the inliner or by stack maps #14926

Open

Description

@alexcrichton

This input:

test inline
target x86_64

function %callee(i64, i64) -> i64 tail {
block0(v0: i64, v1: i64):
    v2 = interrupt_poll v0, v1, user3
    return v2
}

function %caller(i64, i64) -> i64 system_v {
    fn0 = %callee(i64, i64) -> i64 tail
block0(v0: i64, v1: i64):
    v2 = call fn0(v0, v1)
    return v2
}

fails with:

$ cargo run -p cranelift-tools test foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/clif-util test foo.clif`

thread 'worker #3' (2504781) panicked at cranelift/codegen/src/inline.rs:239:21:
should have matched all call instructions, but found: inst0: v2 = interrupt_poll.i64 v0, v1, user3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2026-10-21T20:48:10Z ERROR cranelift_filetests::concurrent] FAIL: panicked in worker #3: should have matched all call instructions, but found: inst0: v2 = interrupt_poll.i64 v0, v1, user3
FAIL foo.clif: panicked in worker #3: should have matched all call instructions, but found: inst0: v2 = interrupt_poll.i64 v0, v1, user3
1 tests
Error: 1 failure

and this input:

test compile
target x86_64
target aarch64

function %f(i64, i64) -> i64 tail {
    ss0 = explicit_slot 8
block0(v0: i64, v1: i64):
    v5 = stack_addr.i64 ss0
    store v0, v5
    v2 = interrupt_poll v0, v1, user3, stack_map=[i64 @ ss0+0]
    v3 = load.i64 v5
    v4 = iadd v2, v3
    return v4
}

fails with:

$ cargo run -p cranelift-tools test foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/clif-util test foo.clif`

thread 'worker #3' (2506268) panicked at cranelift/codegen/src/machinst/lower.rs:966:17:
assertion `left == right` failed
  left: 0
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2026-10-21T20:49:41Z ERROR cranelift_filetests::concurrent] FAIL: panicked in worker #3: assertion `left == right` failed
      left: 0
     right: 1
FAIL foo.clif: panicked in worker #3: assertion `left == right` failed
  left: 0
 right: 1
1 tests
Error: 1 failure

cc @erikrose

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions