feat(libc): export std::__sce_v2::_Syserror_map_search #11421
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11421"
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 edubox on 2026-10-26T12:48:25Z.
What
Exports
std::__sce_v2::_Syserror_map_search(int)(a9DvgsV9dWw) and makes the versionedstd::__sce_v2::_Syserror_map(int)use the same table.The console
libc.prxin PPSA02530 and PPSA28416 exports_Syserror_map_searchat0xce8b0/0xcfb50(41 bytes). It walks 79 16-byte records, compares theintat offset 0 and returns the pointer at offset 8; the fallback is null. The record pointers are RELA relocations, so resolving them from the bundled module gives the 79 strings, including entry 0{0, "success"}and the Sony codes 107, 108, 1040, 1050, 1051 and 1074. Codes 35 and 45 occur twice and the first record wins.The versioned
_Syserror_map(4ITMYcbipA0,0xce870, 57 bytes) is the same loop with"unknown error"as the fallback. Before this change AnyPS5 used the shared FreeBSD list, which has no Sony codes and maps 95/96, which are not in the console's versioned table. Both versioned functions now share the console table; the unversioned_Syserror_mapis unchanged.Tested
Linux x86-64, GCC 16.2.1, Release,
BUILD_TESTING=ON.guest_sce_v2_exceptionsandguest_generic_categorypass.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass.sceNpGetSandboxInfobefore these imports are reached. No Windows product run; the hosted product jobs are skipped by path policy.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T13:01:26Z.
Review: DISMISSED
I completed the source review and the implementation matches the supplied binary analysis:
_Syserror_map_searchreturns null for misses, while versioned_Syserror_mappreserves theunknown errorfallback; selected tests cover Sony codes, duplicate-code order and the unchanged unversioned map. The stated symbol NID checks withtools/nid_names.py. I found no source defect in this patch.The remaining merge blocker is the repository branch rule: this head is based on
2db37cf1de, while currentmainis035ac96edd(17 commits ahead). The intervening commits do not touch the changed implementation or test files and the merge preview is clean. Please sync to currentmainand rerun conventions. Eligibility, conventions, intake, labels, report, Ubuntu relinker/ASan/register-context and the Windows relinker now pass; macOS relinker, register-context and write-watch jobs remain pending. The Linux focused test result in the PR description is author-reported, not independently run here.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:05:36Z.
Review: APPROVED
The prior source review found the new versioned error-map search behavior consistent with the referenced runtime and its tests cover the Sony codes, duplicate-code ordering, and unchanged unversioned map. The author has refreshed the branch through current main and reports focused tests, conventions and diff checks passing. I did not run them locally. No new source concern is visible in this rebase.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T06:53:23Z.
Review: APPROVED
Re-checked — looks good
I reviewed head
9f687728a12434730faa1fa95496c8f66a11a441against recorded base0839e8f3442331a951efe82b5ba700007bc36539; the three-file diff remains scoped to the versioned error-map export/table and focused tests. The hosted Windows product check passes and Linux was skipped; I ran no local C++ tests. I found no blocking issue.Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T03:54:42Z.
Review: COMMENTED
Ran
6a949964f8merged onmain302864d48con Windows 11 x64 (WinLibs GCC 15.2), the Windows side the description leaves out:ctest -R '^guest_sce_v2_exceptions$'passed three times out of three.mainpasses too, andmainplus only this PR'sGuestSceV2Exceptions.cppdoesn't build (_ZNSt8__sce_v220_Syserror_map_searchEi_nid_postfixwas not declared), so the new checks only hold with the new export.On Windows that covers:
_Syserror_map_searchand "unknown error" from_Syserror_map;main(_Syserror_map(2)still matches the unversioned_Syserror_map,_Syserror_map(0)is still "success").From reading:
std::__sce_v2::_Syserror_maponmainare those test lines, so dropping 95 and 96 from the versioned map changes nothing else in the tree.std::_Syserror_mapkeeps the FreeBSD list.The checks are green. The
linuxjob is skipped on pull requests, so the Linux run in the description is the only Linux coverage.AI-assisted: yes.