Windows: relinker entry stub prints an orphan " -> FAILED" line without dependency diagnostics; fix branch ready #3307
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Jnbla6 on 2026-10-11T06:49:34Z.
When
LoadLibraryExWfails in the Windows entry stub and--dependency-diagnosticsis not enabled, the entry stub starts its error output with a bare-> FAILEDline before printingFailed to load module: …:In
WindowsEntryStubBuilder::Build, the"Loading PRX: "prefix (loading) beforeLoadLibraryExWand the" -> OK\n"suffix (loaded) after a successful load are both guarded byif (dependencyDiagnostics). However,writeString(loadFailed, true)(" -> FAILED\n") on the failure path is emitted unconditionally. Without--dependency-diagnostics, no"Loading PRX: …"prefix is written first, leaving-> FAILEDas an orphan line at the start ofstderr(and as the first line ofanyps5.login--windows-guiruns, as noted in #3282).Proposal
writeString(loadFailed, true)behindif (dependencyDiagnostics)inWindowsEntryStubBuilder::Buildso it matcheswriteString(loading)andwriteString(loaded).--dependency-diagnosticsenabled, the output remainsLoading PRX: <path> -> FAILEDfollowed byFailed to load module: <path>.--dependency-diagnostics, the output starts directly withFailed to load module: <path>.Branch
Jnbla6/AnyPS5fix/windows-stub-orphan-failed-line(3f85c8e4ec695dfe458e78a4b303c5981fcedd35):PR #3312 readyWindowsEntryStubBuilder.cpp: only emitloadFailedwhendependencyDiagnosticsis enabled.Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T07:43:12Z.
Carried as #3325 with your commit and authorship (only the message reworded to the conventional-commit form), plus a regression check in
test_windows_import_modules.py. On native Windows the check fails againstmain(AssertionError: -> FAILED) and passes with your fix; the relinker suite passes 104/104.Imported from boykopovar/AnyPS5. Originally posted by Jnbla6 on 2026-10-11T07:54:09Z.
Thanks for carrying this over and adding the regression test