tests: proposed sys-provider fixtures miss the common __error provider on Windows #9616

Closed
opened 2026-10-22 04:35:06 +00:00 by UnhealthyKraken · 2 comments
UnhealthyKraken commented 2026-10-22 04:35:06 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T04:35:06Z.


What happens

The proposed GuestKernelSysPwrite.cpp in #9019 stops on Windows at Missing symbol __error_nid_postfix (unpatched) or Missing symbol 9BcDykPmo1I (patched), before calling the function under test. The fixture queries the libkernel.prx handle; the actual built provider is libc.prx.

Title, test or build step

Independent native execution of #9019's exact 144-line test fixture, in unpatched and NID-patched modes. This report concerns the proposed fixture, not a new failure claimed in a current-main CTest registration. No game was run.

AnyPS5 commit

Libraries: clean upstream d9c99c9ba4dbcbb0a724bad5064e7cb9b1e5f9ef, built locally from public sources. Test source: #9019 at aaad8e9b8a7b2393a170d0dd2d6f5144117a3b00; copied verbatim from its added file and compiled against that checkout's NidCompute.cpp and Sha1.cpp.

The same module-provider limitation is also visible by source inspection in #9162's GuestKernelSysWait.cpp at 3802fb65fbaa0d99010aeab331462da43e82cd4c; that fixture has not been executed here. These are existing contributors' proposals; no duplicate implementation or remote branch edit is proposed.

System

Windows x86-64, reported OS version 10.0.26300.0, supported WinLibs MinGW-w64 GCC 15.2.0, Release libraries. GPU/driver: n/a, native CPU/DLL test.

Steps to reproduce

Build the full libs target, then compile the proposed fixture with:

g++ -std=c++20 -O2 -static -Icore/libs -Icore/libs/nid/include GuestKernelSysPwrite.cpp core/libs/nid/src/NidCompute.cpp core/libs/nid/src/Sha1.cpp -o pwrite-probe.exe

Put the supported toolchain's runtime directory on PATH and run separate processes:

pwrite-probe.exe <build>/core/libs/libs/unpatched unpatched
pwrite-probe.exe <build>/core/libs/libs patched

Both stop during symbol setup. Inspecting the PE export tables confirms that __error_nid_postfix / 9BcDykPmo1I exists in the corresponding common libc.prx, and is absent from libkernel.prx.

Log

Missing symbol __error_nid_postfix
Kernel sys pwrite check failed at line 51

The patched run reports Missing symbol 9BcDykPmo1I at the same assertion. Both terminate with 0xc0000409 after that assertion.

What was checked

A local fixture-only control explicitly loads the corresponding libc.prx and resolves the error accessor there. With every behavioral assertion unchanged, both modes advance past setup and reach the expected current-main pwrite_nid_postfix not implemented failure. This distinguishes the test's provider lookup problem from the already-known missing sys implementation. Candidate implementation validation is separate and must not be inferred from this report.

This direct native lookup differs from a relinked guest import: GetProcAddress on a module handle does not apply AnyPS5's generated guest fallback chain. Closed #8853 / merged #8867 fixed scoped guest kernel-variant imports; they do not make this native fixture lookup search dependent DLLs. The fixture should resolve from the actual common provider or use an explicitly controlled test resolver. No production export alias is needed for this fixture setup problem.

Current issue/PR searches for __error, Windows and GetProcAddress found no dedicated report for these proposed fixture calls; #8853 was reviewed to distinguish its scope. AI-assisted: yes. No firmware files, proprietary captures, host settings or existing game/runtime processes were used or changed.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5973124783 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9616). Originally posted by [UnhealthyKraken](https://github.com/UnhealthyKraken) on 2026-10-22T04:35:06Z. --- ### What happens The proposed `GuestKernelSysPwrite.cpp` in #9019 stops on Windows at `Missing symbol __error_nid_postfix` (unpatched) or `Missing symbol 9BcDykPmo1I` (patched), before calling the function under test. The fixture queries the `libkernel.prx` handle; the actual built provider is `libc.prx`. ### Title, test or build step Independent native execution of #9019's exact 144-line test fixture, in unpatched and NID-patched modes. This report concerns the proposed fixture, not a new failure claimed in a current-main CTest registration. No game was run. ### AnyPS5 commit Libraries: clean upstream `d9c99c9ba4dbcbb0a724bad5064e7cb9b1e5f9ef`, built locally from public sources. Test source: #9019 at `aaad8e9b8a7b2393a170d0dd2d6f5144117a3b00`; copied verbatim from its added file and compiled against that checkout's `NidCompute.cpp` and `Sha1.cpp`. The same module-provider limitation is also visible by source inspection in #9162's `GuestKernelSysWait.cpp` at `3802fb65fbaa0d99010aeab331462da43e82cd4c`; that fixture has not been executed here. These are existing contributors' proposals; no duplicate implementation or remote branch edit is proposed. ### System Windows x86-64, reported OS version `10.0.26300.0`, supported WinLibs MinGW-w64 GCC 15.2.0, Release libraries. GPU/driver: n/a, native CPU/DLL test. ### Steps to reproduce Build the full `libs` target, then compile the proposed fixture with: ``` g++ -std=c++20 -O2 -static -Icore/libs -Icore/libs/nid/include GuestKernelSysPwrite.cpp core/libs/nid/src/NidCompute.cpp core/libs/nid/src/Sha1.cpp -o pwrite-probe.exe ``` Put the supported toolchain's runtime directory on `PATH` and run separate processes: ``` pwrite-probe.exe <build>/core/libs/libs/unpatched unpatched pwrite-probe.exe <build>/core/libs/libs patched ``` Both stop during symbol setup. Inspecting the PE export tables confirms that `__error_nid_postfix` / `9BcDykPmo1I` exists in the corresponding common `libc.prx`, and is absent from `libkernel.prx`. ### Log ``` Missing symbol __error_nid_postfix Kernel sys pwrite check failed at line 51 ``` The patched run reports `Missing symbol 9BcDykPmo1I` at the same assertion. Both terminate with `0xc0000409` after that assertion. ### What was checked A local fixture-only control explicitly loads the corresponding `libc.prx` and resolves the error accessor there. With every behavioral assertion unchanged, both modes advance past setup and reach the expected current-main `pwrite_nid_postfix not implemented` failure. This distinguishes the test's provider lookup problem from the already-known missing sys implementation. Candidate implementation validation is separate and must not be inferred from this report. This direct native lookup differs from a relinked guest import: `GetProcAddress` on a module handle does not apply AnyPS5's generated guest fallback chain. Closed #8853 / merged #8867 fixed scoped guest kernel-variant imports; they do not make this native fixture lookup search dependent DLLs. The fixture should resolve from the actual common provider or use an explicitly controlled test resolver. No production export alias is needed for this fixture setup problem. Current issue/PR searches for `__error`, Windows and `GetProcAddress` found no dedicated report for these proposed fixture calls; #8853 was reviewed to distinguish its scope. AI-assisted: yes. No firmware files, proprietary captures, host settings or existing game/runtime processes were used or changed.
MarcZX10 commented 2026-10-22 11:50:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:50:23Z.


This issue also appears relevant to open PR #9162: its new GuestKernelSysWait.cpp fixture resolves __error from libkernel.prx. The Windows review on #9019 and this issue indicate that __error is exported by libc and is not found by GetProcAddress when queried on the kernel module. I have asked #9162 to resolve it from the correct module and validate both patched and unpatched Windows cases.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340026792 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9616#issuecomment-6340026792). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T11:50:23Z. --- This issue also appears relevant to open PR #9162: its new `GuestKernelSysWait.cpp` fixture resolves `__error` from `libkernel.prx`. The Windows review on #9019 and this issue indicate that `__error` is exported by libc and is not found by `GetProcAddress` when queried on the kernel module. I have asked #9162 to resolve it from the correct module and validate both patched and unpatched Windows cases.
UnhealthyKraken commented 2026-10-22 14:20:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T14:20:22Z.


The same provider rule applies to #9162: resolving __error with GetProcAddress on libkernel.prx cannot find the common libc export. I have linked that proposal to this fixture issue. My earlier Windows reproduction covered #9019; I have not counted a current-head Windows run of #9162 as completed. This remains open until the affected fixtures use libc and both raw/patched Windows cases are validated.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343063628 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9616#issuecomment-6343063628). Originally posted by [UnhealthyKraken](https://github.com/UnhealthyKraken) on 2026-10-22T14:20:22Z. --- The same provider rule applies to #9162: resolving `__error` with `GetProcAddress` on `libkernel.prx` cannot find the common libc export. I have linked that proposal to this fixture issue. My earlier Windows reproduction covered #9019; I have not counted a current-head Windows run of #9162 as completed. This remains open until the affected fixtures use libc and both raw/patched Windows cases are validated.
Sign in to join this conversation.
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#9616
No description provided.