Skip to content

feat(fuzzer): generate Static and StaticMut with Miri-checked provenance - #1525

Open
uurl wants to merge 2 commits into
NVIDIA:mainfrom
uurl:feat/rustlantis-provenance-fix
Open

uurl wants to merge 2 commits into
NVIDIA:mainfrom
uurl:feat/rustlantis-provenance-fix

Conversation

@uurl

@uurl uurl commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for Static and StaticMut operands in Rustlantis, including scalar static declarations, persistent allocations, and provenance-aware pointer/reference tracking.

This is a fresh implementation follow-up to #1245 and partially addresses #1162.

Changes

  • Generate and serialize scalar static and static mut declarations.
  • Support custom-MIR Static and StaticMut operands.
  • Preserve static allocations independently of function frames.
  • Maintain global-root provenance across static reacquisition.
  • Track derived provenance across reference creation, copies, moves, function arguments, and returns.
  • Preserve inherited permissions when graph aliases are retired.
  • Validate reference permissions against memory-tag state, including local references.
  • Keep static_count disabled by default.
  • Add a reproducible Miri Tree Borrows validation harness.

Validation

Using nightly-2026-10-11:

  • Rustlantis workspace: 66/66 tests passed.
  • Generated programs under Miri Tree Borrows: 500/500 passed.
  • Programs containing static operands: 321/500.
  • Programs containing calls with reference parameters: 23/500.
  • Positive deterministic Custom MIR provenance fixture: passed.
  • Negative Miri control: expected UB detected.
  • Zero-static seed 5 regression: passed.
  • Seed 358 regression: passed.

The reference-call counts are structural coverage indicators; they do not prove that every reference argument originates
from a static allocation.

Pre-existing local-reference bug

An isolated regression identified a provenance issue with static_count = 0.

For seed 5:

  • The original generator emits an invalid reborrow rejected by Miri Tree Borrows.
  • Restoring the legacy local-reference validity check reproduces the original program and the same UB.
  • Enabling local-reference read-permission validation changes the generated program and eliminates the UB.
  • Additional mutable-reference write-permission validation remains enabled.

The zero-static regression is now checked automatically by the Miri sweep harness.

Scope

This change focuses on scalar statics and existing pointer/reference types.

Aggregate static initializers, thread-local statics, and arbitrary constant expressions remain outside the current scope.

The generated-program Miri sweep validates Rust execution semantics; it is not a replacement for CUDA CPU/GPU differential testing.

Closes neither #1162 nor the broader static-generation work; this PR partially addresses #1162.

uurl added 2 commits October 15, 2026 22:50
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
@uurl
uurl requested a review from nihalpasham as a code owner October 16, 2026 07:21
@copy-pr-bot

copy-pr-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added the cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book label Oct 17, 2026

This branch has not been deployed

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

Labels

cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants