Skip to content

[BUG]: lean-exporter can reuse an opaque integer ID for distinct definitions #1880

Done

Description

@hs1167

Summary

Each distinct opaque integer definition in an exported MIR function should get a unique oracle ID. Two fallback paths use recyclable register numbers, so different definitions can share an ID.

Minimal repro

The MIR regression compares opaque IDs in the typed exporter output. It uses guarded reads of element zero. Rust-level reproduction has not been established.

Observed output

The baseline regression on e4d512f74 counted four distinct IDs for five definitions. The numbers below are observations from that run, not expected register assignments.

assertion `left == right` failed: load, extract_array_element, and clc_query_* must have distinct OpaqueUint IDs: [(6, 32), (8, 32), (8, 32), (9, 32), (10, 32)]
  left: 4
 right: 5

Ubuntu on WSL2, Rust 1.99.1. The diagnostic comes from the host exporter test.

Related fix: #1881.

Activity

  1. added
    cuda-oxide
    formal-verification
    bug
    safety
    codegen
    soundness-audit
    on Nov 27, 2026
  2. added a commit that references this issue on Nov 27, 2026
    8b91bb7
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

    bugcodegencuda-oxideformal-verificationsafetysoundness-audit

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions