Skip to content

Call graph (Rust/Go): Rust macro invocations linked to a same-named fn, calls inside Rust struct literals / vec![] args missed, Go generic instantiation call missed #5634

Closed

Description

@squid-protocol

Problem

Independent body oracle on the licensed Rust/Go DOOM ports (engine 0e2bf4ade) finds Rust/Go call graphs very accurate (recall 0.999 on rust-doom, room4doom and gore; precision 1.000 on rust-doom and gore, ~0.998 on room4doom), with these small shapes:

  1. Rust macro invocation recorded as a call to an unrelated same-named function (room4doom, 29 edges): write!(f, ...) inside fmt (expands to f.write_fmt(...)) becomes fmt -> write, linking to the crate's own write fn, e.g. game-config/src/lib.rs:30, gameplay/src/save.rs:63, gamestate-traits/src/keys.rs:154. A name!(...) invocation should not resolve to a function name.
  2. Rust calls inside struct-literal fields and macro arguments missed (room4doom, ~10): render/backend/src/lib.rs:448 upload_ui: pixels: as_u32_slice(s.pixels()), w: s.width(), h: s.height() inside a struct literal; tools/editor-core/src/texture_lumps.rs:152,197,221: encode_texture_lumps(&[vec![def(...)]]); tools/geom-kernel/src/name8.rs:130: Name8::new( in a nested visitor impl.
  3. Go generic instantiation call missed (gore, 1): doom.go:33305 r_InitSpriteLumps: patch := w_CacheLumpNumT[*patch_t](...).

Context: gore vs linuxdoom cross-language consensus (625 shared functions, 1,233 shared edges, Jaccard 0.90) found 0 engine misses on either side; all 134 differing edges are real code differences (C macros FTOM/MTOF vs explicit FixedMul calls in Go, refactors).

Acceptance

Prototype: /srv/storage_16tb/projects/gitgalaxy/doom-study/study-prototype/callcheck_rustgo2.py, gore_vs_linuxdoom.py.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    metrics
    core-engine
    priority: low
    scope:core
    needs:doom-corpus
    on Oct 19, 2026
  2. squid-protocol commented on Oct 21, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 5634-20261021T0604Z (host nyx) ended without a PR. No PR: fixes already on main via #5719 (24 tests pass). Open owner decision: oracle credits nested-fn calls to outer fn vs engine nested fn; then re-run #5630 oracle and close #5634 if 0 misses.

  3. added
    scope:frontier
    and removed
    scope:core
    on Oct 21, 2026
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

    bugcore-enginemetricsneeds:doom-corpuspriority: lowscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions