feat(libc): implement __isinf #2931
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2931"
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 reyani-dev on 2026-10-10T18:33:42Z.
Resubmission of #2174, which was closed because no title was shown stopping on it. The title evidence has since been posted there by @babyhuey (run):
On
mainc963432d, ProsperoTV (PPSA99003), Jelly5 (PPSA99505) and Emby5 (PPSA99515) stop at__isinf(V02oFv+-JzA): WindowsFAIL: unresolved ELF import V02oFv+-JzA (__isinf) from libSceLibcInternal.prx, Linuxundefined symbol: V02oFv+-JzA. With this change each moves on to its next import.The function is still absent on current
main, and no open PR implements it. The branch is rebased onto currentmain. Windows 11 (WinLibs GCC 15.2.0), Release:guest_mathpasses 3/3,check_conventions.pypasses, andpr_overlap.pyreports no overlap.What
Exports
__isinf(double)next to__isnanand__isfinite. Like the existing__isinff, it returns 1 for either infinity and 0 otherwise, which is what FreeBSD'slib/libc/gen/isinf.cdoes. glibc'sisinfreturns -1 for negative infinity instead, so the test pins the sign behaviour.Titles: open-source homebrew from the #1578 catalog audit imports it from
libSceLibcInternal(resolved throughlibc.prx): PPSA74126 Stremio Plus, PPSA92280 Capy Mobile, PPSA99003 ProsperoTV, PPSA99039 EVO Player, PPSA99082 OpenNOW, PPSA99169 RetroArch, PPSA99177 PS5VR, PPSA99420 PS5MC, PPSA99505 Jelly5 and PPSA99515 Emby5. I haven't run any of these titles.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:guest_math_tests, next to the__isinffones: ±infinity and an overflowed product return 1; NaN, 0 andDBL_MAXreturn 0.x > DBL_MAX(which misses -inf), makesguest_mathfail.cmake --build build --target libs: the patchedlibc.prxexports the NID.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap. This branch also merges cleanly with my #2158, #2166, #2167 and #2173.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T18:58:02Z.
Full Linux and Windows builds and tests for this head (
e7311656), using the project's Build workflow. I can't start the upstream manual run, so I ran the samebuild.ymlin my fork through a mirror PR. Like the upstream run, the jobs check out the PR head merged into currentmain(bf6e25a1):ctest: 703/703 passedctest: 711/711 passedRun: https://github.com/AchrafReyani/AnyPS5/actions/runs/38076392087
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T19:00:16Z.
Progress report (
1476f76→e731165)➖ System libraries: 84.56% (+0.0%, +1 implemented functions)
✅ 1 implemented
__isinf_nid_postfixImported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-10T19:09:30Z.
Heads-up so the evidence here isn't read against the wrong layout: the runs of mine linked in the description are from
mainc963432d, before #2605. Since #2605 each title'ssce_module/libc.prxhas to be unwrapped, and that module is the SDK shim whose exports point 1872 libc functions at one return-0 stub (#2652). So on currentmain(9c5d67fb, catalog run with the module unwrapped) ProsperoTV (PPSA99003) stops atarc4random_buf(#2865) instead of__isinf. The stop comes back once the shim's return-0 exports are left out, which is what the closed #2705 did; its table lists ProsperoTV at__isinf(V02oFv+-JzA).Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T19:17:27Z.
Thanks @babyhuey, that's an important caveat. These titles' imports declare
libSceLibcInternal, so on currentmainthey bind to the bundled SDK shim's return-0 export (#1497/#2652) instead of failing at load, which hides the stop. Once #1529 keepslibSceLibcInternal-declared imports host-bound, the stop comes back, as the closed #2705 table showed. Either way, these titles call the real function, so onmainthey currently get 0 from it.