Skip to content

GPU: bound DRED breadcrumb history reads - #116

Merged
vanya890 merged 1 commit into
devfrom
agent/gpt6-dred-bounded-history
Nov 26, 2026
Merged

vanya890 merged 1 commit into
devfrom
agent/gpt6-dred-bounded-history

Conversation

@vanya890

@vanya890 vanya890 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Port upstream Marvisak#3268's safe DRED breadcrumb-history reading, with additional bounds:

  • Never construct a Rust slice from the runtime's untrusted pCommandHistory pointer/count. Read only through ReadProcessMemory page by page and retain a contiguous readable prefix.
  • Use checked byte-length/address arithmetic and a 64 MiB diagnostic history cap. Report whether the prefix ended at an unreadable page, the cap, an invalid range, or allocation failure.
  • Stop immediately at the first unreadable page; do not allocate/read pages beyond the first inaccessible page.
  • Use a fixed page-sized stack buffer and try_reserve for the retained prefix so diagnostic allocation failure does not panic the removal-report path.
  • Only index done when it is inside the readable prefix; otherwise report op unknown and skip in-flight indexing.

Tests cover a readable page followed by an inaccessible page with a later committed page, an inaccessible first page, the history byte cap, and address overflow.

Validation

@vanya890
vanya890 force-pushed the agent/gpt6-dred-bounded-history branch from e827f23 to a1822eb Compare November 26, 2026 15:27
@vanya890
vanya890 marked this pull request as ready for review November 26, 2026 15:31

Copy link
Copy Markdown
Owner Author

The rerun of the previously flaky Tests job completed successfully on the exact same head a1822eb795bf52385421401533445139cba3bfe0: full Windows CI run 45849307123 SUCCESS. The earlier failure was isolated to timing-sensitive frame::tests::waits_end_on_ticks_and_count_frames; DRED-specific tests passed in that run too. Marked ready for review; base is current dev e2ca2aa.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant