Repository navigation
feat(libc): implement fegetenv - #5563
Merged
Merged
Conversation
9 tasks done
karimibrahim07
force-pushed
the
feat/libc-fegetenv
branch
from
October 14, 2026 00:31
32af117 to
81104f7
Compare
11 tasks done
Contributor
|
Built and ran this on Windows: head
AI-assisted. |
This was referenced Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r#5495 changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Checked Added one commit: moved the TechnicalDebt line out of the end of its section to avoid adjacency conflicts. Rebased onto current main; merging once CI is green. |
adriadam10
force-pushed
the
feat/libc-fegetenv
branch
from
October 14, 2026 12:05
81104f7 to
32a11a5
Compare
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Java 25 LAN / DNS (PPSA99869, #5501) imports
fegetenv(psx0YiAKm7k) fromlibSceLibcInternal.prx, and no AnyPS5 library exports it. With #5502 (sysctlnametomib, the current stop onmain) applied, the loader stops here:fegetenvfollows FreeBSD 11 amd64fenv.cand the 32-bytefenv_tofx86/fenv.h(unchanged onmain):fnstenvstores the 28-byte x87 environment,fldcwreloads the control word becausefnstenvmasks every x87 exception, MXCSR goes at 0x1c, and it returns 0. It is implemented in libc, since the loader also resolveslibSceLibcInternalimports againstlibc.prx, as foratanhf. A null pointer throws. The technical-debt entry records that the console'slibSceLibcInternalis assumed to have the same code and layout.Tested
Windows 11 Pro (26300), WinLibs GCC 15.2.0 r7, Release. The branch is rebased onto feddf7f.
fegetenvand its test sit next to_FltroundsandCheckNearbyint, out of the lines #5495 changes, andtools/pr_overlap.py --branchreports no overlap with open pull requests.guest_mathgainsCheckFegetenv. It sets the x87 control word to0x0f7e(IE unmasked, round toward zero) and MXCSR to0x7fa0, leaves a pending x87 divide-by-zero flag, then checks the control word, status word and MXCSR stored in the guestfenv_t, that the control word and MXCSR are unchanged afterwards, and that a null pointer throws. With thefldcwremoved the test fails (0xc0000409).PPSA99869-lan-dns-pass-01.000.000.zip, SHA-2563cfeed2f…11cc, as in Java 25 LAN / DNS (PPSA99869) #5501), run onmain30f9612 before the rebase. I unwrappedeboot.binandsce_module/libc.prxfrom their fSELF containers and relinked with--windows --to-intel --trap-sdk-syscall-stubs --registry:main:FAIL: unresolved ELF import UkEV4hvMo1E from libkernel.prx(sysctlnametomib)main+ feat(libkernel): implement sysctlnametomib for the sysctl names AnyPS5 serves #5502:FAIL: unresolved ELF import psx0YiAKm7k from libSceLibcInternal.prx(fegetenv)main+ feat(libkernel): implement sysctlnametomib for the sysctl names AnyPS5 serves #5502 + this PR:FAIL: unresolved ELF import +hFjyohmOU0 from libkernel.prx(mincore, the next absent import Java 25 LAN / DNS (PPSA99869) #5501 lists)ctest(--parallel 4 --timeout 120) on the current head: 1108 of 1109 pass.windows_trace_importsfails locally only because Defender deletes its generatedoutput.exe(WinError 225); it fails the same way onmain.python tools/check_conventions.py --base origin/mainpasses.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)🤖 Generated with Claude Code