fix(relinker): preserve GUI startup failure status without stderr #1153

Merged
ebarr24 merged 1 commit from upstream-pr/1153 into main 2026-10-08 08:26:57 +00:00
ebarr24 commented 2026-10-07 15:02:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ebarr24 on 2026-10-07T15:02:41Z.


What

Fixes #1127. Windows GUI startup errors now retain their original NTSTATUS when diagnostic output is unavailable or fails: missing symbols return 0xc0000139, and missing modules return 0xc0000135, instead of both becoming 0xc0000001. Diagnostic output is best effort; missing imports still terminate startup.

Base: cea1ef13c35044356348bc6221d45f3a80f7df09
Head: 2ed81aebe4fe0732db52d737514380ceb0fbc9da

The GUI fixtures now have an independent Windows branch outside the console missing-module block. #1101 addresses filename casing in a separate production file; its updated head ba3e75a1001e6a5cec385e208330fdac973db462 also moved its SONAME test. Both current heads merge cleanly. Neither PR requires the other. The other shared production-file change, #1128, is formatting; the pinned merge check is also clean.

Tested

Windows 11 (10.0.26200.0), MinGW-w64 GCC 15.2.0, CMake 4.4.4, Ninja 1.13.2, Python 3.12.14:

  • Built the isolated current base normally with only the identical regression source added. windows_import_modules fails on the intended assertion: the GUI missing-symbol fixture returns 0xc0000001 instead of 0xc0000139.
  • Built the clean final head, including runtime libraries. The focused GUI regression passes, including missing-symbol and missing-module cases launched through ShellExecute without redirected handles.
  • Complete Full profile on the final head: 395/395 passed, zero skips. Earlier dependency-diagnostics timeouts also occurred on isolated upstream 2b8f0b21; their cause is not established. The complete final-head run passes. No tests or assertions were disabled.
  • A separate checkout of the actual combined #1153/#1101 tree (7b0b09aa4d3d09a9ee910d0a5877d6e7970bf3fa) was built and passed all 30/30 Relinker groups, including both GUI status and filename/SONAME cases. An earlier combined run had a dependency-diagnostics timeout; a subsequent complete run passes. This combination is local validation only; #1101's implementation is not included in this PR.
  • Current conventions and whitespace checks pass. Library/shader badge counts are unchanged.

Exact-head fork validation workflow passed on ubuntu-24.04: 378 passed, 21 skipped, no failures. Each skipped GPU fixture requires at least 32-lane subgroups unavailable on the software Vulkan runner; these paths are unrelated to this diagnostic change. The windows_import_modules converter regression passes three consecutive runs. WindowsEntryStubBuilder.cpp is compiled on Linux too, where it emits Windows PE code. The GUI launch assertions run only on Windows; Ubuntu checks the shared build and converter path.

Initial sandbox runs could not launch synthetic PE fixtures (WinError 623); the Windows runtime results above use the normal user context. These are public synthetic guest-to-host checks; no commercial-title or console coverage is claimed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4774547918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1153). Originally posted by [ebarr24](https://github.com/ebarr24) on 2026-10-07T15:02:41Z. --- ### What Fixes #1127. Windows GUI startup errors now retain their original NTSTATUS when diagnostic output is unavailable or fails: missing symbols return `0xc0000139`, and missing modules return `0xc0000135`, instead of both becoming `0xc0000001`. Diagnostic output is best effort; missing imports still terminate startup. Base: `cea1ef13c35044356348bc6221d45f3a80f7df09` Head: `2ed81aebe4fe0732db52d737514380ceb0fbc9da` The GUI fixtures now have an independent Windows branch outside the console missing-module block. #1101 addresses filename casing in a separate production file; its updated head `ba3e75a1001e6a5cec385e208330fdac973db462` also moved its SONAME test. Both current heads merge cleanly. Neither PR requires the other. The other shared production-file change, #1128, is formatting; the pinned merge check is also clean. ### Tested Windows 11 (`10.0.26200.0`), MinGW-w64 GCC 15.2.0, CMake 4.4.4, Ninja 1.13.2, Python 3.12.14: - Built the isolated current base normally with only the identical regression source added. `windows_import_modules` fails on the intended assertion: the GUI missing-symbol fixture returns `0xc0000001` instead of `0xc0000139`. - Built the clean final head, including runtime libraries. The focused GUI regression passes, including missing-symbol and missing-module cases launched through ShellExecute without redirected handles. - Complete Full profile on the final head: **395/395 passed, zero skips**. Earlier dependency-diagnostics timeouts also occurred on isolated upstream `2b8f0b21`; their cause is not established. The complete final-head run passes. No tests or assertions were disabled. - A separate checkout of the actual combined #1153/#1101 tree (`7b0b09aa4d3d09a9ee910d0a5877d6e7970bf3fa`) was built and passed all **30/30 Relinker groups**, including both GUI status and filename/SONAME cases. An earlier combined run had a dependency-diagnostics timeout; a subsequent complete run passes. This combination is local validation only; #1101's implementation is not included in this PR. - Current conventions and whitespace checks pass. Library/shader badge counts are unchanged. Exact-head [fork validation workflow](https://github.com/ebarr24/AnyPS5/actions/runs/37653813691) passed on ubuntu-24.04: **378 passed, 21 skipped**, no failures. Each skipped GPU fixture requires at least 32-lane subgroups unavailable on the software Vulkan runner; these paths are unrelated to this diagnostic change. The `windows_import_modules` converter regression passes three consecutive runs. WindowsEntryStubBuilder.cpp is compiled on Linux too, where it emits Windows PE code. The GUI launch assertions run only on Windows; Ubuntu checks the shared build and converter path. Initial sandbox runs could not launch synthetic PE fixtures (`WinError 623`); the Windows runtime results above use the normal user context. These are public synthetic guest-to-host checks; no commercial-title or console coverage is claimed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
ebarr24 commented 2026-10-07 17:07:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ebarr24 on 2026-10-07T17:07:00Z.


Resolved in 2ed81aebe4fe0732db52d737514380ceb0fbc9da, rebased onto current main. The GUI regressions now sit in their own Windows branch outside the console missing-module block.

This is distinct from #1101: that PR resolves Windows guest filename casing; this one preserves the original startup failure status when diagnostic output fails. #1101's author independently moved its SONAME case at ba3e75a1001e6a5cec385e208330fdac973db462. I verified that the current heads merge cleanly, then built their actual combined tree and ran all 30 Relinker groups successfully, including both regressions. Neither PR depends on the other.

The identical GUI regression fails on isolated main cea1ef13 with the expected status mismatch and passes on this final head. The final Windows Full run passes 395/395 tests with no skips. Earlier dependency-diagnostics timeouts also reproduced on isolated upstream 2b8f0b21; subsequent complete final-head and combined runs pass. These are synthetic guest checks, with no title/console claim.

Exact-head Ubuntu validation also passes: 378 passed, 21 unrelated GPU subgroup skips; the converter regression passes three times. Native GUI status assertions are covered by the Windows runs above.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6042811158 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1153#issuecomment-6042811158). Originally posted by [ebarr24](https://github.com/ebarr24) on 2026-10-07T17:07:00Z. --- Resolved in `2ed81aebe4fe0732db52d737514380ceb0fbc9da`, rebased onto current main. The GUI regressions now sit in their own Windows branch outside the console missing-module block. This is distinct from #1101: that PR resolves Windows guest filename casing; this one preserves the original startup failure status when diagnostic output fails. #1101's author independently moved its SONAME case at `ba3e75a1001e6a5cec385e208330fdac973db462`. I verified that the current heads merge cleanly, then built their actual combined tree and ran all 30 Relinker groups successfully, including both regressions. Neither PR depends on the other. The identical GUI regression fails on isolated main `cea1ef13` with the expected status mismatch and passes on this final head. The final Windows Full run passes 395/395 tests with no skips. Earlier dependency-diagnostics timeouts also reproduced on isolated upstream `2b8f0b21`; subsequent complete final-head and combined runs pass. These are synthetic guest checks, with no title/console claim. Exact-head [Ubuntu validation](https://github.com/ebarr24/AnyPS5/actions/runs/37653813691) also passes: 378 passed, 21 unrelated GPU subgroup skips; the converter regression passes three times. Native GUI status assertions are covered by the Windows runs above.
adriadam10 commented 2026-10-08 08:26:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T08:26:53Z.


Checked build + full ctest on Linux merged onto current main (424/424), the stub's branch logic (every diagnostic failure path jumps past the write and the original NTSTATUS is still raised), and CI on the head: linux, windows (runs windows_import_modules with the new GUI cases) and conventions are green; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6055879255 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1153#issuecomment-6055879255). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T08:26:53Z. --- Checked build + full ctest on Linux merged onto current main (424/424), the stub's branch logic (every diagnostic failure path jumps past the write and the original NTSTATUS is still raised), and CI on the head: linux, windows (runs `windows_import_modules` with the new GUI cases) and conventions are green; merging.
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
boykopovar/AnyPS5!1153
No description provided.