[removed by author] #313

Merged
thegl0w merged 3 commits from upstream-pr/318 into main 2026-11-22 03:43:37 +00:00
thegl0w commented 2026-11-21 21:56:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thegl0w on 2026-11-21T21:56:24Z.


[removed by author]

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5432833557 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/318). Originally posted by [thegl0w](https://github.com/thegl0w) on 2026-11-21T21:56:24Z. --- [removed by author]
upstream-sync closed this pull request 2026-11-24 06:42:23 +00:00
R0Y00 commented 2026-11-24 06:48:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:43:18Z.


The writer pass promotes an attribute loaded from a writable section to source="constant" when it finds no RIP-relative store. A write through a pointer to that word can change the value before XMemAlloc, but this branch would still make --fail-on-unresolved report success. Please keep the initial value and the absence of known direct writers as diagnostic evidence and classify that path as unresolved (unless immutability is independently established). Add a source-built case with a store through an address held in a register, followed by the RIP-relative load into EDX. The read-only constant cases should still resolve and the new case should trip --fail-on-unresolved.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073080226 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/318#issuecomment-7073080226). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T02:43:18Z. --- The writer pass promotes an attribute loaded from a writable section to source="constant" when it finds no RIP-relative store. A write through a pointer to that word can change the value before XMemAlloc, but this branch would still make --fail-on-unresolved report success. Please keep the initial value and the absence of known direct writers as diagnostic evidence and classify that path as unresolved (unless immutability is independently established). Add a source-built case with a store through an address held in a register, followed by the RIP-relative load into EDX. The read-only constant cases should still resolve and the new case should trip --fail-on-unresolved.
thegl0w commented 2026-11-24 06:48:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thegl0w on 2026-11-22T03:00:27Z.


AI-generated: this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval. The runs below were done on the account owner's PC.

Agreed: having no direct writer doesn't show the word is immutable. Fixed in f12bf8a.

  • Writable-section loads are now always data. They count as unresolved, so --fail-on-unresolved fails on them. The report keeps the initial value (word), the RIP-relative writes found (written_at, possibly empty) and a detail saying writes through pointers aren't tracked. Nothing in the scanner establishes immutability today, so no path leads back to constant.
  • Read-only loads still resolve. read_only_constant is unchanged.
  • New source-built case pointer_written:
    lea rax, pointer_word
    mov DWORD PTR [rax], 05E50000h
    mov edx, pointer_word
    call QWORD PTR __imp_XMemAlloc
    
    It's in sites_not_fully_constant, so --fail-on-unresolved fails on it. Under the previous rule it was reported as constant 0xa8004000, although the stored word is 0x05e50000.
  • The former data_constant case is now data_unwritten, and is also unresolved.
  • Control: the delay-load fixture (one constant site) must now exit with 0 under both flags, so the fixture's exit-1 results aren't just the flag always failing.
  • Mutants: the previous rule, and dropping written_at, both make the check fail.
  • Local read-only rescan of the package's 16 DLLs: unchanged. All 5 sites are constant on every path: Bink uses immediates through thunks, and the AMD upscaler loads from a read-only section. Nothing from the package is included.
  • Full run at f12bf8a, Windows 11 build 26300, hardware included, debug layer enabled: 144/144 passed (3 capability skips), including xmem_attribute_scan (23 fixture sites) and docs_links.

The PR description is updated to match.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073267301 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/318#issuecomment-7073267301). Originally posted by [thegl0w](https://github.com/thegl0w) on 2026-11-22T03:00:27Z. --- > **AI-generated:** this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval. The runs below were done on the account owner's PC. Agreed: having no direct writer doesn't show the word is immutable. Fixed in `f12bf8a`. - **Writable-section loads are now always data.** They count as unresolved, so `--fail-on-unresolved` fails on them. The report keeps the initial value (`word`), the RIP-relative writes found (`written_at`, possibly empty) and a `detail` saying writes through pointers aren't tracked. Nothing in the scanner establishes immutability today, so no path leads back to `constant`. - **Read-only loads still resolve.** `read_only_constant` is unchanged. - **New source-built case `pointer_written`:** ```asm lea rax, pointer_word mov DWORD PTR [rax], 05E50000h mov edx, pointer_word call QWORD PTR __imp_XMemAlloc ``` It's in `sites_not_fully_constant`, so `--fail-on-unresolved` fails on it. Under the previous rule it was reported as constant `0xa8004000`, although the stored word is `0x05e50000`. - **The former `data_constant` case** is now `data_unwritten`, and is also unresolved. - **Control:** the delay-load fixture (one constant site) must now exit with 0 under both flags, so the fixture's exit-1 results aren't just the flag always failing. - **Mutants:** the previous rule, and dropping `written_at`, both make the check fail. - **Local read-only rescan of the package's 16 DLLs:** unchanged. All 5 sites are constant on every path: Bink uses immediates through thunks, and the AMD upscaler loads from a read-only section. Nothing from the package is included. - **Full run at `f12bf8a`,** Windows 11 build 26300, hardware included, debug layer enabled: 144/144 passed (3 capability skips), including `xmem_attribute_scan` (23 fixture sites) and `docs_links`. The PR description is updated to match.
thegl0w commented 2026-11-24 06:48:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thegl0w on 2026-11-22T03:06:46Z.


AI-generated: this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval. The run below was done on the account owner's PC.

Rebased onto main (1088c1b). #411 had rewritten the Python check list in AGENTS.md, which conflicted. The writable-data fix described above is now fc89726, unchanged apart from the hash.

  • AGENTS.md lists tests/xmem_attribute_scan_check.py after pso_readiness_check.py, matching its place in the workflow's Python job.
  • 67017e5 adds the check to the Linux list in docs/non-windows-hosts.md in the same place. I left the macOS list unchanged, because it installs only pefile and the scanner also needs iced-x86 (pinned in requirements-dev.txt). Adding it there would also mean changing that install line, which I haven't tested on macOS.
  • Full run at 67017e5, Windows 11 build 26300, hardware included, debug layer enabled: 157/157 passed (3 capability skips), including xmem_attribute_scan and docs_links.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073332810 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/318#issuecomment-7073332810). Originally posted by [thegl0w](https://github.com/thegl0w) on 2026-11-22T03:06:46Z. --- > **AI-generated:** this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval. The run below was done on the account owner's PC. Rebased onto `main` (`1088c1b`). #411 had rewritten the Python check list in AGENTS.md, which conflicted. The writable-data fix described above is now `fc89726`, unchanged apart from the hash. - AGENTS.md lists `tests/xmem_attribute_scan_check.py` after `pso_readiness_check.py`, matching its place in the workflow's Python job. - `67017e5` adds the check to the Linux list in `docs/non-windows-hosts.md` in the same place. I left the macOS list unchanged, because it installs only `pefile` and the scanner also needs `iced-x86` (pinned in `requirements-dev.txt`). Adding it there would also mean changing that install line, which I haven't tested on macOS. - Full run at `67017e5`, Windows 11 build 26300, hardware included, debug layer enabled: 157/157 passed (3 capability skips), including `xmem_attribute_scan` and `docs_links`.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!313
No description provided.