fix(libc): match FreeBSD asinf errno #3693
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3693"
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 CouchRiv on 2026-10-11T15:31:11Z.
What
asinf(2.0 (0x40000000))returns0xffc00000(errno 33) onmain; FreeBSDlib/msun/src/math.hreturns0xffc00000(errno 0) for the same input (github.com/freebsd/freebsd-src@8c639945a4/lib/msun/src/math.h (L67-L69)).asinfnow returns the FreeBSD result for this case. The other functions inlibcdo not change.Tested
Linux (CachyOS), GCC; RTX 4070 Ti (NVIDIA), Radeon 610M (RADV) and lavapipe (Mesa 26.2.4).
main: guest_math fails at run time. Green with this change: guest_math pass 3 repeats each.scripts/verify-branch.sh <worktree> --tests '^(guest_math)$': build, ctest on three drivers, conventions, diff check, publication gate: pass=8 fail=0.Checklist
main; no other open PR implements the same functions (claim gate CLEAR)NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryAI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:51:50Z.
Checked on current main:
guest_mathis red without the change and green with it (74/74 in the touched libc/libs scope); the newCheckAsinfErrnofails whenMath.cppis reverted.Added on your branch:
#include <cerrno>inMath.cpp(it usederrnothrough a transitive include).Merging once CI is green.