Skip to content

xref v0.0.4

Choose a tag to compare

@alex09x alex09x released this 02 Nov 03:44
· 110 commits to main since this release

Highlights

  • Readable Typed Pseudo-C (xref c / xref slice / xref dump):
    • Synthesizes readable C function signatures (ret_ty fn_<hex>(ty arg_0, ...)) with immutable parameter names (arg_0..arg_5) and function header docblocks summarizing caller counts, panic source locations, parameter offset/role evidence, and return usage.
    • Performs bidirectional dataflow type propagation across registers, stack slots, and SSA live-range webs (void *, const void *, u8 *, const u8 *, u16 *, const u16 *, u32 *, const u32 *, u64 *, const u64 *, usize, i64, u64, i32, u32, u16, u8, unk64), including element-indexed SIB array syntax (((u64 *)base)[idx + k]).
    • Annotates direct, PLT, and stripped Rust runtime calls (rust_panic_bounds_check, rust_slice_index_fail, rust_capacity_overflow, bcmp, memcpy, etc.) with inline context comments and resolved string/location arguments.
    • Preserves indirect call arguments read in predecessor guards, prevents memory load base/index pointer leakage across integer Add/Sub, avoids double-scaling typed pointer SIB displacements, and retains normal return blocks in xref slice before cold noreturn panic targets.
  • Zero-goto Structured Control Flow:
    • Recognizes stripped Rust cold noreturn panic helpers and inlines cold noreturn blocks directly into their guarding if (...) { ... } branches.
    • Structures multi-level forward jumps, rotated loop epilogue/early-return guards, and detached cold continuation blocks via equivalence-preserving region structuring and scoped skip flags (u8 skip_<hex> = 0;, normalized as @skip_N in xref diff-c).
  • Self-Hosted Dark Workbench (docs/):
    • Locked dark static workbench (docs/index.html, docs/recorded-data.js) with 114 verbatim CLI runs across 32 scenarios and 7 stripped self-hosted functions (0 goto statements across all 7 workbench functions).