fix(libc): set ERANGE and raise overflow in both units when coshf overflows as measured on a PS5 #11109

Open
orezraey wants to merge 8 commits from upstream-pr/11109 into main
orezraey commented 2026-10-25 18:00:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-25T18:00:50Z.


What

coshf from the system libSceLibcInternal.sprx measured on a retail PS5 (firmware 13.60) with a homebrew probe from a payload process (MXCSR 0x9fc0): 18 edge values with their errno and x87/SSE status flags, and a sweep of 2,310,537,216 of the 2^32 input bit patterns: |x| below 90 completes, x from 90 stops at 0x47040000 when the probe's time budget expires, and x from -90 down is not reached. The source and console log are in this gist (pcoshf).

Overflow. For |x| from 0x42b2d4fd (the first input past the largest finite result) up to FLT_MAX, the console returns +inf, sets errno to ERANGE (34) and raises overflow and inexact (0x28) in both the x87 status word and MXCSR. AnyPS5 returned huge * huge: +inf with the flags only in MXCSR and no errno. The overflow path now calls _Feraise with overflow, which raises overflow and inexact in both units and sets ERANGE, and returns +inf.

_Feraise takes the guest's bit for overflow (0x08). The Windows host's FE_OVERFLOW is 4 (MinGW's fenv.h numbers the exceptions differently), so the guest value is spelled out.

Already matching: 0x42b2d4fc gives 0x7f7fffec with inexact in MXCSR and no errno; ±inf give +inf and quiet NaNs come back unchanged, with no flags and no errno.

Not changed: the hash of the console's results over [2^-12, 90) differs from AnyPS5's over the same inputs, while [0, 2^-12) and the swept part from 90 hash the same, but the probe does not log which inputs differ. The AnyPS5 side is its coshf copied into a host program (g++ -O2 -ffp-contract=off, MXCSR 0x9fc0, the probe's FNV-1a): pos_dense gives 0x3e24546359ffa5f4 against the console's 0x140826a84f2b20dd, and pos_low and the partial pos_high give the console's 0x49cae1d47d9d0383 and 0x06308f18855d0383. The console's negative ranges hash like the positive ones. The debt entry records that; finding them needs a probe that embeds AnyPS5's coshf and logs the mismatching inputs.

A follow-up probe (gist, pcoshf2) ran the console's coshf against an exact copy of this one on the console for every input in [2^-12, 90) of each sign. 31,585 of 154,402,816 per sign differ, all by 1 ulp, spread over every branch. The console's results match neither the older five-term fdlibm expf/expm1f (3 of the 2,000 logged inputs) nor (float)cosh((double)x) (1,105 of 2,000). Its code is execute-only, so it cannot be read from a payload. The debt entry now records this instead of "not identified yet"; changing the non-overflow path stays out of this PR.

Before and after

coshf PS5 AnyPS5 before AnyPS5 now
|x| from 0x42b2d4fd up to FLT_MAX +inf, errno ERANGE, overflow and inexact in x87 and MXCSR +inf, flags only in MXCSR, no errno +inf, errno ERANGE, overflow and inexact in x87 and MXCSR
0x42b2d4fc, ±inf, quiet NaN as listed above the same the same
inputs in [2^-12, 90) 31,585 per sign differ by 1 ulp the same the same (debt)

Tested

Head 8500fa8fdd (merge of main 5a36b2df1e; the only conflict was docs/dev/debt/libc.md, keeping main's new powf entry and this PR's coshf entry), Windows 11 Pro 26200, WinLibs GCC 15.2, Release, and Linux (WSL Ubuntu, GCC).

  • guest_math checks 0x42b2d4fd, 0x42b30000, -0x42b30000, 0x42b40000 and FLT_MAX: +inf, guest errno 34, and 0x28 in both the x87 status word and MXCSR (cleared with fnclex and ldmxcsr before each call, since the host's feclearexcept leaves the denormal bit). It also checks that 0x42b2d4fc, ±inf and a NaN raise no overflow and leave errno alone.
  • It passes three runs in a row, with guest_math_exact; on the previous code it fails (no errno, no x87 flags).
  • tools/check_conventions.py passes. At 8500fa8fdd, guest_math passes three runs in a row on Windows and three on Linux.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10002, #10245, #10253, #10274, #10510 (they edit the libc.md entries next to the coshf one; merge order only; #10247, #10265 and #10317 have merged); #8417 edits the same lines of Math.cpp, GuestMath.cpp and libc.md (merge order only); #7544 (ionut27001) rewrites the lgamma and signgam entry right above the coshf one in libc.md (merge order only)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5007253750 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109). Originally posted by [orezraey](https://github.com/orezraey) on 2026-10-25T18:00:50Z. --- ### What `coshf` from the system `libSceLibcInternal.sprx` measured on a retail PS5 (firmware 13.60) with a homebrew probe from a payload process (MXCSR 0x9fc0): 18 edge values with their `errno` and x87/SSE status flags, and a sweep of 2,310,537,216 of the 2^32 input bit patterns: |x| below 90 completes, x from 90 stops at 0x47040000 when the probe's time budget expires, and x from -90 down is not reached. The source and console log are in [this gist](https://gist.github.com/orezraey/a46423d510dd1decb7d4ec4831937996) (`pcoshf`). **Overflow.** For |x| from 0x42b2d4fd (the first input past the largest finite result) up to `FLT_MAX`, the console returns +inf, sets `errno` to `ERANGE` (34) and raises overflow and inexact (0x28) in **both** the x87 status word and MXCSR. AnyPS5 returned `huge * huge`: +inf with the flags only in MXCSR and no `errno`. The overflow path now calls `_Feraise` with overflow, which raises overflow and inexact in both units and sets `ERANGE`, and returns +inf. `_Feraise` takes the guest's bit for overflow (0x08). The Windows host's `FE_OVERFLOW` is 4 (MinGW's `fenv.h` numbers the exceptions differently), so the guest value is spelled out. **Already matching:** 0x42b2d4fc gives `0x7f7fffec` with inexact in MXCSR and no `errno`; ±inf give +inf and quiet NaNs come back unchanged, with no flags and no `errno`. **Not changed:** the hash of the console's results over [2^-12, 90) differs from AnyPS5's over the same inputs, while [0, 2^-12) and the swept part from 90 hash the same, but the probe does not log which inputs differ. The AnyPS5 side is its `coshf` copied into a host program (g++ `-O2 -ffp-contract=off`, MXCSR 0x9fc0, the probe's FNV-1a): `pos_dense` gives 0x3e24546359ffa5f4 against the console's 0x140826a84f2b20dd, and `pos_low` and the partial `pos_high` give the console's 0x49cae1d47d9d0383 and 0x06308f18855d0383. The console's negative ranges hash like the positive ones. The debt entry records that; finding them needs a probe that embeds AnyPS5's `coshf` and logs the mismatching inputs. A follow-up probe ([gist](https://gist.github.com/orezraey/a667bbcd5e16d18b00fe2e1aa3ddd3af), `pcoshf2`) ran the console's `coshf` against an exact copy of this one on the console for every input in [2^-12, 90) of each sign. 31,585 of 154,402,816 per sign differ, all by 1 ulp, spread over every branch. The console's results match neither the older five-term fdlibm `expf`/`expm1f` (3 of the 2,000 logged inputs) nor `(float)cosh((double)x)` (1,105 of 2,000). Its code is execute-only, so it cannot be read from a payload. The debt entry now records this instead of "not identified yet"; changing the non-overflow path stays out of this PR. **Before and after** | `coshf` | PS5 | AnyPS5 before | AnyPS5 now | |---|---|---|---| | \|x\| from 0x42b2d4fd up to `FLT_MAX` | +inf, `errno` `ERANGE`, overflow and inexact in x87 and MXCSR | +inf, flags only in MXCSR, no `errno` | +inf, `errno` `ERANGE`, overflow and inexact in x87 and MXCSR | | 0x42b2d4fc, ±inf, quiet NaN | as listed above | the same | the same | | inputs in [2^-12, 90) | 31,585 per sign differ by 1 ulp | the same | the same (debt) | ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Head `8500fa8fdd` (merge of `main` `5a36b2df1e`; the only conflict was `docs/dev/debt/libc.md`, keeping main's new `powf` entry and this PR's `coshf` entry), Windows 11 Pro 26200, WinLibs GCC 15.2, Release, and Linux (WSL Ubuntu, GCC). - `guest_math` checks 0x42b2d4fd, 0x42b30000, -0x42b30000, 0x42b40000 and `FLT_MAX`: +inf, guest `errno` 34, and 0x28 in both the x87 status word and MXCSR (cleared with `fnclex` and `ldmxcsr` before each call, since the host's `feclearexcept` leaves the denormal bit). It also checks that 0x42b2d4fc, ±inf and a NaN raise no overflow and leave `errno` alone. - It passes three runs in a row, with `guest_math_exact`; on the previous code it fails (no `errno`, no x87 flags). - `tools/check_conventions.py` passes. At `8500fa8fdd`, `guest_math` passes three runs in a row on Windows and three on Linux. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10002, #10245, #10253, #10274, #10510 (they edit the `libc.md` entries next to the `coshf` one; merge order only; #10247, #10265 and #10317 have merged); #8417 edits the same lines of `Math.cpp`, `GuestMath.cpp` and `libc.md` (merge order only); #7544 (ionut27001) rewrites the `lgamma and signgam` entry right above the `coshf` one in `libc.md` (merge order only) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
thepoppfish commented 2026-10-25 18:33:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T18:33:59Z.

Review: CHANGES_REQUESTED


Reviewed exact head 894cbf6dd8c4e6250630e00e6c963d678cb9209d. The overflow-path change passes my native checks; I request one correction to the measurement-coverage wording in the debt entry and PR description (inline).

The linked primary console log, revision 5b4b44ab28536d90398a8a155192cc596bbd1905, records firmware13.60, the system module and resolved function, MXCSR0x9fc0 and the expected overflow edge behavior. It also explicitly records an expired budget: 2,310,537,216 inputs checked, not all4,294,967,296. Four dense/low ranges finish; positive-high is partial and negative-high has no result. Please retain that boundary in the coverage claim, or add the missing completed evidence. I have not reproduced the console measurement myself.

Independent Windows11 build26200 / MSYS2 UCRT GCC16.2.0-6 checks:

  • Built complete actual Math.cpp from head and unchanged base 7a25f87620a9b862dc194dd0f659686b0f6cc8b0, linked with the actual FloatingPoint.cpp and MathExact.cpp. The external harness supplies __error_nid_postfix as return &errno; (the same body as Process.cpp) and an unused throwing unimplemented hook. No math or _Feraise result/flag behavior is mocked. This is an isolated executable harness, not the full shared libc/guest TLS integration.
  • 3,180 actual coshf_nid_postfix calls per version /6,360 total: the18 recorded edge inputs plus256 deterministic finite overflow magnitudes of both signs, under MXCSR0x1f80 and0x9fc0, with clean flags or a pre-existing invalid/divide-by-zero flag in both units. Rounding is nearest and traps are masked.
  • The head fixes all 3,102 overflow configurations: +inf, guest errno34 and sticky flags OR0x28 in both x87 and SSE. Base produces the same infinity/SSE result but preserves the errno sentinel and lacks the added x87 flags. The 78 non-overflow controls are identical across versions, including largest-finite output, signed zero, infinities, quiet/signaling NaNs and tiny inputs. Every case preserves the x87 control word and all MXCSR control bits.
  • At the console's MXCSR with initially clear flags, all18 recorded return-bit / errno-effect / x87 / SSE tuples match the head. The local probe begins errno at71 to verify preservation; console errno0 maps to that unchanged sentinel. This compares the published edge measurements, not a new console run or an exhaustive numeric oracle.
  • The complete committed GuestMathExact.cpp fixture passes in this isolated harness (one locally registered CTest,0.06s). I did not independently run the full GuestMath.cpp product fixture or the repository's registered product targets; the PR's reported runs remain author evidence. No Linux/macOS, title, GPU, hosted workflow or alternative-rounding/unmasked-trap console behavior is certified.

Relevant math/fenv/process production and math test inputs are unchanged from the base above through fetched main baabfbc2046a850e54e60af3a7fd9949f4669e1d; only this PR's stated math/test/debt patch is under review. Current conventions and whitespace checks pass; author checkout is clean. Existing documentation merge-order coordination remains as recorded in the PR, not newly resolved by this review.

AI-assisted review and native probe; the stated local checks actually executed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644667454 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109#pullrequestreview-5644667454). Originally posted by [thepoppfish](https://github.com/thepoppfish) on 2026-10-25T18:33:59Z. **Review:** CHANGES_REQUESTED --- Reviewed exact head `894cbf6dd8c4e6250630e00e6c963d678cb9209d`. The overflow-path change passes my native checks; I request one correction to the measurement-coverage wording in the debt entry and PR description (inline). The [linked primary console log](https://gist.github.com/orezraey/a46423d510dd1decb7d4ec4831937996), revision `5b4b44ab28536d90398a8a155192cc596bbd1905`, records firmware13.60, the system module and resolved function, MXCSR0x9fc0 and the expected overflow edge behavior. It also explicitly records an expired budget: **2,310,537,216 inputs checked**, not all4,294,967,296. Four dense/low ranges finish; positive-high is partial and negative-high has no result. Please retain that boundary in the coverage claim, or add the missing completed evidence. I have not reproduced the console measurement myself. Independent Windows11 build26200 / MSYS2 UCRT GCC16.2.0-6 checks: - Built complete actual `Math.cpp` from head and unchanged base `7a25f87620a9b862dc194dd0f659686b0f6cc8b0`, linked with the actual `FloatingPoint.cpp` and `MathExact.cpp`. The external harness supplies `__error_nid_postfix` as `return &errno;` (the same body as `Process.cpp`) and an unused throwing unimplemented hook. No math or `_Feraise` result/flag behavior is mocked. This is an isolated executable harness, not the full shared libc/guest TLS integration. - **3,180 actual `coshf_nid_postfix` calls per version /6,360 total**: the18 recorded edge inputs plus256 deterministic finite overflow magnitudes of both signs, under MXCSR0x1f80 and0x9fc0, with clean flags or a pre-existing invalid/divide-by-zero flag in both units. Rounding is nearest and traps are masked. - The head fixes all **3,102 overflow configurations**: +inf, guest errno34 and sticky flags OR0x28 in both x87 and SSE. Base produces the same infinity/SSE result but preserves the errno sentinel and lacks the added x87 flags. The **78 non-overflow controls are identical** across versions, including largest-finite output, signed zero, infinities, quiet/signaling NaNs and tiny inputs. Every case preserves the x87 control word and all MXCSR control bits. - At the console's MXCSR with initially clear flags, **all18 recorded return-bit / errno-effect / x87 / SSE tuples match the head**. The local probe begins errno at71 to verify preservation; console errno0 maps to that unchanged sentinel. This compares the published edge measurements, not a new console run or an exhaustive numeric oracle. - The complete committed `GuestMathExact.cpp` fixture passes in this isolated harness (one locally registered CTest,0.06s). I did not independently run the full `GuestMath.cpp` product fixture or the repository's registered product targets; the PR's reported runs remain author evidence. No Linux/macOS, title, GPU, hosted workflow or alternative-rounding/unmasked-trap console behavior is certified. Relevant math/fenv/process production and math test inputs are unchanged from the base above through fetched main `baabfbc2046a850e54e60af3a7fd9949f4669e1d`; only this PR's stated math/test/debt patch is under review. Current conventions and whitespace checks pass; author checkout is clean. Existing documentation merge-order coordination remains as recorded in the PR, not newly resolved by this review. AI-assisted review and native probe; the stated local checks actually executed.
thepoppfish commented 2026-10-25 18:55:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T18:55:22Z.

Review: APPROVED


Re-reviewed exact head f82f0ccefba719274c035d2aae7c412abacd0bd3 and the updated description. Approve: my measurement-coverage finding is corrected.

The description now gives 2,310,537,216 of2^32 inputs, states that both below90 ranges completed, limits positive-high to the recorded stop at0x47040000, and states that negative-high was not reached. The debt entry also records the expired time budget instead of claiming an all-pattern sweep. These bounds agree with the previously reviewed console log at gist revision5b4b44ab28536d90398a8a155192cc596bbd1905. The description supplies the local host-comparison build settings and hashes; I have not independently repeated those hash sweeps.

Git confirms that only docs/dev/debt/libc.md changed from reviewed894cbf6. Production math/fenv and test inputs are identical, so the earlier6,360-call native head/base comparison and18 recorded-edge comparisons still apply to the unchanged code. I did not rerun them for this documentation-only revision. Their existing scope remains: isolated Windows native harness, nearest rounding and masked traps, with the disclosed errno interface adapter; no new console/full-product/Linux/macOS or exhaustive numeric result is claimed.

Current conventions against main e1ef22e888d7fd09cffbe71042676d6a5910787b, whitespace and clean-checkout checks pass. The code path already passed my checks, and the unsupported coverage wording has now been removed. The corrected inline thread is still marked unresolved; please resolve it from the author/maintainer side.

AI-assisted re-review. No remaining finding from my prior review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644742898 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109#pullrequestreview-5644742898). Originally posted by [thepoppfish](https://github.com/thepoppfish) on 2026-10-25T18:55:22Z. **Review:** APPROVED --- Re-reviewed exact head `f82f0ccefba719274c035d2aae7c412abacd0bd3` and the updated description. Approve: my measurement-coverage finding is corrected. The description now gives **2,310,537,216 of2^32 inputs**, states that both below90 ranges completed, limits positive-high to the recorded stop at0x47040000, and states that negative-high was not reached. The debt entry also records the expired time budget instead of claiming an all-pattern sweep. These bounds agree with the previously reviewed console log at gist revision5b4b44ab28536d90398a8a155192cc596bbd1905. The description supplies the local host-comparison build settings and hashes; I have not independently repeated those hash sweeps. Git confirms that **only `docs/dev/debt/libc.md` changed** from reviewed894cbf6. Production math/fenv and test inputs are identical, so the earlier6,360-call native head/base comparison and18 recorded-edge comparisons still apply to the unchanged code. I did not rerun them for this documentation-only revision. Their existing scope remains: isolated Windows native harness, nearest rounding and masked traps, with the disclosed errno interface adapter; no new console/full-product/Linux/macOS or exhaustive numeric result is claimed. Current conventions against main `e1ef22e888d7fd09cffbe71042676d6a5910787b`, whitespace and clean-checkout checks pass. The code path already passed my checks, and the unsupported coverage wording has now been removed. The corrected inline thread is still marked unresolved; please resolve it from the author/maintainer side. AI-assisted re-review. No remaining finding from my prior review.
MarcZX10 commented 2026-11-14 07:54:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T07:54:36Z.

Review: APPROVED


Reviewed — looks good

The change matches the documented PS5 overflow behavior for coshf, and the added tests check the overflow result, errno, and exception flags.

What I ran

Reviewed head 81e964909314a227856c46c17f618f1bae7fa65e. No commands or tests were run in this review; the reader was used to inspect the prepared diff and pinned repository files.

Results

Check Result Note
Diff and changed code review passed Three changed files read
Tests not run Author reports prior Windows and Linux runs

Findings

Blocking

None.

Non-blocking

None.

Not verified

Physical console behavior and the reported Windows and Linux test runs were not independently verified. All changed files listed in the manifest were read: core/libs/prx/libc/src/Math.cpp, core/libs/tests/GuestMath.cpp, and docs/dev/debt/libc.md. No changed files were excluded; review/files.json was unavailable through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5902886541 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109#pullrequestreview-5902886541). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T07:54:36Z. **Review:** APPROVED --- # Reviewed — looks good The change matches the documented PS5 overflow behavior for `coshf`, and the added tests check the overflow result, `errno`, and exception flags. ## What I ran Reviewed head `81e964909314a227856c46c17f618f1bae7fa65e`. No commands or tests were run in this review; the reader was used to inspect the prepared diff and pinned repository files. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code review | passed | Three changed files read | | Tests | not run | Author reports prior Windows and Linux runs | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Physical console behavior and the reported Windows and Linux test runs were not independently verified. All changed files listed in the manifest were read: `core/libs/prx/libc/src/Math.cpp`, `core/libs/tests/GuestMath.cpp`, and `docs/dev/debt/libc.md`. No changed files were excluded; `review/files.json` was unavailable through the reader. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-16 20:10:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T20:10:55Z.

Review: APPROVED


Reviewed — looks good

Nothing in the reviewed change blocks merging; the overflow path and regression checks align with the stated behavior.

What I ran

Reviewed head 9ab03b5f47f2f3e69db2930ec7ac478c6df284dd using repo_read.py for changed lines and targeted context. No build or tests were run; results reported in the description are author supplied.

Results

Check Result Note
Changed-line review passed All three changed files read
Build and tests not run Author reports Windows and Linux runs
Console behavior not run Author reports PS5 measurements

Findings

Blocking

None.

Non-blocking

None.

Not verified

No independent build, test run, or console measurement was performed. Reviewed all changed files listed in the manifest: core/libs/prx/libc/src/Math.cpp, core/libs/tests/GuestMath.cpp, and docs/dev/debt/libc.md; none were excluded. The PR description's reported test and console results were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926783560 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109#pullrequestreview-5926783560). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T20:10:55Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the reviewed change blocks merging; the overflow path and regression checks align with the stated behavior. ## What I ran Reviewed head `9ab03b5f47f2f3e69db2930ec7ac478c6df284dd` using `repo_read.py` for changed lines and targeted context. No build or tests were run; results reported in the description are author supplied. ## Results | Check | Result | Note | |---|---|---| | Changed-line review | passed | All three changed files read | | Build and tests | not run | Author reports Windows and Linux runs | | Console behavior | not run | Author reports PS5 measurements | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No independent build, test run, or console measurement was performed. Reviewed all changed files listed in the manifest: `core/libs/prx/libc/src/Math.cpp`, `core/libs/tests/GuestMath.cpp`, and `docs/dev/debt/libc.md`; none were excluded. The PR description's reported test and console results were not independently verified. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 13:25:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:25:14Z.

Review: COMMENTED


Built the focused checks against the existing Linux runtime. The exact coshf boundary and floating-point flag checks passed when run alone. The broader math fixture stopped in a separate _FCosh case in this standalone setup.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170654860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11109#pullrequestreview-6170654860). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T13:25:14Z. **Review:** COMMENTED --- Built the focused checks against the existing Linux runtime. The exact `coshf` boundary and floating-point flag checks passed when run alone. The broader math fixture stopped in a separate `_FCosh` case in this standalone setup. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/11109:upstream-pr/11109'
git switch 'upstream-pr/11109'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/11109'
git switch 'upstream-pr/11109'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/11109'
git switch 'upstream-pr/11109'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/11109'
git switch 'main'
git merge --squash 'upstream-pr/11109'
git switch 'main'
git merge --ff-only 'upstream-pr/11109'
git switch 'main'
git merge 'upstream-pr/11109'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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!11109
No description provided.