native: note_written reads descriptor tables with plain loads on every dispatch #449

Closed
opened 2026-11-27 19:51:45 +00:00 by github-bot · 3 comments
Owner

@⁠lautarocherro on GitHub · 2026-11-27 19:48 UTC · original

Since 95627c66, NativeHost::note_written runs for every dispatch the native host prepares, with or without copy-back. It reads each record of the bound resource tables through descriptor::view, a plain read_unaligned of title memory.

remirror_tables and resources_named read the same spans with safe_read, because part of a span can be unreadable. When it is, note_written faults the process instead of skipping those entries.

Plan: read the span with safe_read (entry by entry if that fails, as remirror_tables does) and look the views up from those records with one lock per table. Test: a dispatch whose bound table runs into an unreadable page.

**@⁠lautarocherro** on GitHub · 2026-11-27 19:48 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/445) Since 95627c66, `NativeHost::note_written` runs for every dispatch the native host prepares, with or without copy-back. It reads each record of the bound resource tables through `descriptor::view`, a plain `read_unaligned` of title memory. `remirror_tables` and `resources_named` read the same spans with `safe_read`, because part of a span can be unreadable. When it is, `note_written` faults the process instead of skipping those entries. Plan: read the span with `safe_read` (entry by entry if that fails, as `remirror_tables` does) and look the views up from those records with one lock per table. Test: a dispatch whose bound table runs into an unreadable page.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:51:45 +00:00
Author
Owner

@⁠lautarocherro on GitHub · 2026-11-27 19:48 UTC · original

/claim

**@⁠lautarocherro** on GitHub · 2026-11-27 19:48 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/445#issuecomment-7226890219) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 19:48 UTC · original

Claimed by @⁠lautarocherro. Open a draft pull request with Refs #445 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 19:48 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/445#issuecomment-7226893045) Claimed by @⁠lautarocherro. Open a draft pull request with `Refs #445` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-28 00:36 UTC · original

Thank you for this. It is fixed on main by #451. I have not checked every case from this report in the game myself, so please retest on main a6a58361 and reopen this if you still see it. Closing as fixed.

**@⁠LakshanSivakumar** on GitHub · 2026-11-28 00:36 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/445#issuecomment-7231042267) Thank you for this. It is fixed on main by #451. I have not checked every case from this report in the game myself, so please retest on main a6a58361 and reopen this if you still see it. Closing as fixed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.