feat(libc): implement unsigned 64-bit maximum #10460

Merged
Danigamer05 merged 1 commit from upstream-pr/10460 into main 2026-10-27 17:53:22 +00:00
Danigamer05 commented 2026-10-24 01:44:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Danigamer05 on 2026-10-24T01:44:29Z.


What

Add __std_max_8u (Lg0dYZuDrz4) to libc: it takes a nonempty range of unsigned 64-bit elements and returns the maximum value, rather than a pointer to that element. Read elements through the existing memcpy helper so unaligned ranges work, and leave the input untouched. Null, empty, reversed and partial-element ranges throw through NotImplemented_nid_no_patch; their native failure behavior is not reproduced and is recorded in debt.

This export is a real dependency of Marvel's Wolverine, PPSA03671 version 01.001.005 (bring-up discussion #5516). A fresh Windows conversion on original validation base 9232ee9c986e54c5c148ef36c729ea4c1c31408e, with unused-filter=2, retains its non-weak libc.prx import and PLT stub at 0x5f21f00. Direct calls at 0x5ec9f89 and 0x5eca3a4 were inspected; the first stores the returned 64-bit value. This is an import/dependency fix, not a claim that the title now boots or plays.

Contract evidence:

  • The title's bundled libc.prx exports this NID at RVA 0x63990, size 0x2a4. Reading its implementation confirms rdi/rsi range arguments, 8-byte elements, unsigned comparisons and a 64-bit result in rax. Its ELF SHA256 is 483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6.
  • The original function was run directly on this Windows host from its mapped load segments, without relocations, module initialization, a title launch or other module exports. It uses only its code and image-relative constants on the tested valid ranges. The built, NID-patched candidate and the original agree on all 8,545 comparison cases.
  • Microsoft STL's public declaration and implementation agree with the value-returning unsigned 64-bit signature. The implementation here is written from the contract; no third-party code, title bytes or firmware files are added.

Tested

Current-main synchronization (27 October 2026). Exact tested/published head: 7792cff8ef984f2f39d685dd1b1bc9e45a72c92a. Main base: cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f.

  • Rebased from c862a8f34e900926260b7cbf3fcf1082be2e6ac3 onto the two newer main commits. Main changed only the windows_crash_stack_words test regex in core/libs/prx/libc/CMakeLists.txt (#11633). The entire four-file contribution patch is byte-identical before and after the rebase; no implementation or regression assertion changed.
  • On this exact head, rebuilt libc and guest_vector_algorithms_tests in the existing full-project Release configurations. guest_vector_algorithms and public_headers pass 2/2 on Windows 11 / WinLibs GCC 15.2.0 and 2/2 on Ubuntu 24.04 WSL / GCC 13.3.0.
  • All seven synchronized helper PRs still merge cleanly in forward and reverse order, producing the same tree. Their new combined revision 7da0577e45f238c6bfa01a818bd7e27f727ebeff also builds and passes both focused tests on Windows and Ubuntu. This synchronization ran 32 focused checks in total across the seven individual heads and the combined head.
  • Conventions, whitespace and strict main-sync checks pass: one commit ahead and zero behind the main base above.
  • The combined production sources, headers and regression sources are byte-identical to the previous combined revision a27d73c1f43135378c54ed6477af71273135ec42; only the unrelated upstream CMake regex differs. The previous original-module differential, standalone-header and AddressSanitizer evidence below retains its stated revisions and was not rerun for this synchronization.
  • The full CTest suite and all 64 general standalone-header batches were not run. No console, title or GPU run and no performance claim.
Earlier implementation validation and provenance

Current-main refresh (27 October 2026). Exact tested/published head: c862a8f34e900926260b7cbf3fcf1082be2e6ac3. Fetched main base: 74acfad65b3f0fd4eab653f3a3989d298fba1157.

  • Rebased from 62c85f44a6a50b0ffb6ae72e7d6405c5a8c7769f. The __std_max_8u production body is byte-identical to that head. Every existing main declaration and debt entry is preserved; the patch still changes only the implementation, public declaration, regression cases and debt entry.
  • Windows 11 x64, WinLibs GCC 15.2.0, Release, full-project configuration: rebuilt production libc and guest_vector_algorithms_tests; ctest --test-dir build -R "^(guest_vector_algorithms|public_headers)$" -V --output-on-failure passed 2/2 on this exact head (19.38 s).
  • Ubuntu 24.04 under WSL, GCC 13.3.0 and CMake 3.28.3, Release, full-project configuration in a separate native Linux checkout: rebuilt production libc and the focused executable; the same checks passed 2/2 on this exact head (14.76 s). The runtime uses its existing memory-comparison fallback when asynchronous userfaultfd write watching is unavailable.
  • The same focused checks also pass on the unmodified main base on both platforms. All seven remaining vector-helper PRs (#10460, #11295, #11300, #11302, #11304, #11309 and #11333), together with #11289 already in main, merge without content conflicts. Merging the seven in forward and reverse order produces the same tree. That combined revision a27d73c1f43135378c54ed6477af71273135ec42 also builds and passes both focused checks on Windows and Ubuntu.
  • The current #10788 head 92db947130efc9e7e12c492683329f2ebc3e1996 merges cleanly with the main base, each individual helper and the seven-helper composition. This is a content-merge check for #10788; its implementation was not part of the combined runtime run.
  • Conventions, whitespace and tools/check_main_sync.py --base origin/main --head c862a8f34e900926260b7cbf3fcf1082be2e6ac3 --strict pass. The sync check is one ahead and zero behind the fetched main base above. Bundled dependencies use that base's pinned revisions; no contribution dependency was introduced.
  • public_headers audits unique declarations and umbrella coverage. Its current upstream 90-second timeout is unchanged. The full set of 64 standalone-header batches and the full CTest suite were not run; the targeted header checks below were added afterward.

Additional validation on 27 October 2026, combined revision a27d73c1f43135378c54ed6477af71273135ec42 (the same seven-helper composition described above):

  • The five standalone public libc headers (include/Api.hpp, include/exceptions/Runtime.hpp, include/exceptions/Unwind.hpp, include/SonyCrt.hpp, and libc.hpp), plus a compilation unit including all 368 library umbrellas together, pass with C++20 and -Werror on Windows/WinLibs GCC 15.2.0 and Ubuntu/GCC 13.3.0. Every header is included twice, and the existing checker also rejects third-party header dependencies: 6 compilation units per platform, all pass. This is targeted coverage, not the full 64-batch matrix.
  • A separate Ubuntu full-project configuration with ANYPS5_ENABLE_ASAN=ON, RelWithDebInfo, rebuilt libc and guest_vector_algorithms_tests. ASAN_OPTIONS=halt_on_error=1:detect_leaks=1 ctest --test-dir build-asan-libc-followup-20261027-a -R '^guest_vector_algorithms$' -V --output-on-failure passed 1/1, with no AddressSanitizer or LeakSanitizer finding.
  • These added checks ran on the combined revision, not on seven additional individual builds. The individual Windows/Ubuntu Release results above remain associated with their exact published heads.

The earlier differential and negative-control results below belong to their stated heads. The original-module differential was not rerun for this refresh. No console, title or GPU execution and no performance claim.

Earlier implementation validation and provenance

Review follow-up (25 October 2026), published/tested head 62c85f44a6a50b0ffb6ae72e7d6405c5a8c7769f, base 88f99678bff7345c2a7f83aefcf1b2a8a81c7498:

  • Rebased onto current main and resolved the guest-test conflict. Kept main's public-header includes and all its vector-algorithm cases; declared __std_max_8u once in core/libs/prx/libc/include/Api.hpp, next to the maximum-element declarations.
  • Removed the rejected-range helper and its six assertions. Production guards and debt remain. Valid unsigned boundaries, tail lengths, offsets, repeated maxima and untouched-input cases remain covered.
  • Windows 11 / WinLibs GCC 15.2.0 r7 / CMake 4.3.1: built production libs, relinker and guest_vector_algorithms_tests. ctest --test-dir build -R "^(guest_vector_algorithms|public_headers)$" -V --output-on-failure: 2/2 pass. An initial header audit while the full build was running exceeded its 30-second limit; the standalone audit passed, and the final CTest run after the build passed in 20.67 seconds without changing the timeout.
  • Ubuntu 24.04 under WSL2 (kernel 6.6.114.1), GCC 13.3.0, CMake 3.28.3, Release, bundled dependencies, BUILD_TESTING=ON: configured the full project from a temporary source copy taken from this head in Ubuntu's filesystem, built the production libc through guest_vector_algorithms_tests, and ran the same CTest expression: 2/2 pass; public_headers finished in 13.81 seconds. The runtime reported unavailable asynchronous userfaultfd write protection and used its existing memory-comparison fallback.
  • Repeated the isolated Windows comparison against the title-bundled original and this head's NID-patched production libc: 8,545 cases, zero mismatches, including 256 guard-page cases. No title launch or console measurement.
  • Conventions and PR-diff whitespace checks pass. The earlier baseline/mutation and import-audit records below refer to the original 24 October validation; invalid-range throw assertions are no longer part of the committed regression.

Original 24 October validation:

Windows 11 build 26200, AMD Ryzen 7 3700X, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_RELINKER_ONLY=OFF, SDL_CCACHE=OFF.

Original 24 October base: 9232ee9c986e54c5c148ef36c729ea4c1c31408e. Original published head: 676c3ca4f971f1b02c26b979d13c3217b471a454. Code and tests were validated at 39ff2ddc071afc7f57ee3e5be90b9b0c2653c236; the final amendment only moves the debt note beside the existing vector-algorithm entry. Both compiled source/test files were byte-identical to original head 676c3ca4f971f1b02c26b979d13c3217b471a454.

  • Built production libs, relinker and guest_vector_algorithms_tests on main; the original guest_vector_algorithms passes.
  • Added committed regressions covering individual values, pairwise 32/64-bit and sign-bit boundaries, repeated maxima, lengths around vector/tail boundaries, offsets 0–15, untouched input/sentinels on valid ranges.
  • Three independently rebuilt negative controls fail: signed comparisons, truncating later elements to 32 bits, and skipping the last element. Restored the exact candidate sources and rebuilt production targets. ctest --test-dir build -R "^guest_vector_algorithms$" --repeat until-fail:3 -V --timeout 25 passes all three runs without skips.
  • Native differential: lengths 1–257 at offsets 0–31, 256 cases against inaccessible guard pages at either end, all 64 single-bit boundaries, and UINT64_MAX: 8,545 cases, zero mismatches between the original, the candidate reached through its patched NID, and an unsigned-maximum reference. The final restored production binary was compared again successfully. These are host executions of one original function, not console measurements.
  • Converted the title and three bundled modules in a separate test directory, leaving the established runtime untouched. The import audit now finds Lg0dYZuDrz4 in built libc. Its conservative source classifier calls it a stub because unsupported-range guards still invoke NotImplemented; valid-range behavior was exercised through that exact NID. Other absent imports and throwing functions remain, so no title execution or unblock is claimed.
  • Conventions, whitespace and the required overlap scan pass as described below. The original run did not cover Linux/macOS, a console, the full CTest suite, title execution, GPU or performance; the Linux follow-up is recorded above.

Original 24 October overlap: the final required scan reports no confirmed overlap. The first scan found only three confirmed debt-note insertions (#8937, #10129, #10134); moving this note beside the vector entry separates them. The stale shared-file comparisons were inspected against each branch's merge base: all shared changes are in docs/dev/debt/libc.md, with no changed vector-algorithm or __std_max_8u entry. The inspected PRs were #3965, #5021, #5303, #7081, #7544, #7648, #7715, #8150, #8306, #8417, #8863, #8965, #9133, #9232, #9408, #9447, #9526, #9527, #9552, #9669, #9833, #9844, #9873, #9929, #10002, #10003, #10007, #10113, #10226, #10229, #10234, #10245, #10247, #10253, #10265, #10274, #10283, #10306, #10314, #10315, #10316, #10317, #10321, #10325, #10328, #10346 and #10349. Their stale branches are not claimed merge-clean. No runtime dependency on those PRs is introduced.

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: none
  • Fixes: none
  • Unblocks: none confirmed; PPSA03671 #5516 imports this function, but other dependencies remain and the title was not run
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4991511722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10460). Originally posted by [Danigamer05](https://github.com/Danigamer05) on 2026-10-24T01:44:29Z. --- ### What Add `__std_max_8u` (`Lg0dYZuDrz4`) to libc: it takes a nonempty range of unsigned 64-bit elements and returns the maximum value, rather than a pointer to that element. Read elements through the existing `memcpy` helper so unaligned ranges work, and leave the input untouched. Null, empty, reversed and partial-element ranges throw through `NotImplemented_nid_no_patch`; their native failure behavior is not reproduced and is recorded in debt. This export is a real dependency of Marvel's Wolverine, PPSA03671 version 01.001.005 ([bring-up discussion #5516](https://github.com/boykopovar/AnyPS5/discussions/5516)). A fresh Windows conversion on original validation base `9232ee9c986e54c5c148ef36c729ea4c1c31408e`, with `unused-filter=2`, retains its non-weak `libc.prx` import and PLT stub at `0x5f21f00`. Direct calls at `0x5ec9f89` and `0x5eca3a4` were inspected; the first stores the returned 64-bit value. This is an import/dependency fix, not a claim that the title now boots or plays. Contract evidence: - The title's bundled `libc.prx` exports this NID at RVA `0x63990`, size `0x2a4`. Reading its implementation confirms `rdi`/`rsi` range arguments, 8-byte elements, unsigned comparisons and a 64-bit result in `rax`. Its ELF SHA256 is `483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6`. - The original function was run directly on this Windows host from its mapped load segments, without relocations, module initialization, a title launch or other module exports. It uses only its code and image-relative constants on the tested valid ranges. The built, NID-patched candidate and the original agree on all 8,545 comparison cases. - [Microsoft STL's public declaration and implementation](https://github.com/microsoft/STL/blob/b6f01e438b68ee497f9c08313e49d12bb2f0d8e0/stl/src/vector_algorithms.cpp#L3954) agree with the value-returning unsigned 64-bit signature. The implementation here is written from the contract; no third-party code, title bytes or firmware files are added. ### Tested Current-main synchronization (27 October 2026). Exact tested/published head: `7792cff8ef984f2f39d685dd1b1bc9e45a72c92a`. Main base: `cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f`. - Rebased from `c862a8f34e900926260b7cbf3fcf1082be2e6ac3` onto the two newer main commits. Main changed only the `windows_crash_stack_words` test regex in `core/libs/prx/libc/CMakeLists.txt` (#11633). The entire four-file contribution patch is byte-identical before and after the rebase; no implementation or regression assertion changed. - On this exact head, rebuilt libc and `guest_vector_algorithms_tests` in the existing full-project Release configurations. `guest_vector_algorithms` and `public_headers` pass **2/2 on Windows 11 / WinLibs GCC 15.2.0** and **2/2 on Ubuntu 24.04 WSL / GCC 13.3.0**. - All seven synchronized helper PRs still merge cleanly in forward and reverse order, producing the same tree. Their new combined revision `7da0577e45f238c6bfa01a818bd7e27f727ebeff` also builds and passes both focused tests on Windows and Ubuntu. This synchronization ran 32 focused checks in total across the seven individual heads and the combined head. - Conventions, whitespace and strict main-sync checks pass: one commit ahead and zero behind the main base above. - The combined production sources, headers and regression sources are byte-identical to the previous combined revision `a27d73c1f43135378c54ed6477af71273135ec42`; only the unrelated upstream CMake regex differs. The previous original-module differential, standalone-header and AddressSanitizer evidence below retains its stated revisions and was not rerun for this synchronization. - The full CTest suite and all 64 general standalone-header batches were not run. No console, title or GPU run and no performance claim. <details> <summary>Earlier implementation validation and provenance</summary> Current-main refresh (27 October 2026). Exact tested/published head: `c862a8f34e900926260b7cbf3fcf1082be2e6ac3`. Fetched main base: `74acfad65b3f0fd4eab653f3a3989d298fba1157`. - Rebased from `62c85f44a6a50b0ffb6ae72e7d6405c5a8c7769f`. The `__std_max_8u` production body is byte-identical to that head. Every existing main declaration and debt entry is preserved; the patch still changes only the implementation, public declaration, regression cases and debt entry. - Windows 11 x64, WinLibs GCC 15.2.0, Release, full-project configuration: rebuilt production libc and `guest_vector_algorithms_tests`; `ctest --test-dir build -R "^(guest_vector_algorithms|public_headers)$" -V --output-on-failure` passed **2/2** on this exact head (19.38 s). - Ubuntu 24.04 under WSL, GCC 13.3.0 and CMake 3.28.3, Release, full-project configuration in a separate native Linux checkout: rebuilt production libc and the focused executable; the same checks passed **2/2** on this exact head (14.76 s). The runtime uses its existing memory-comparison fallback when asynchronous userfaultfd write watching is unavailable. - The same focused checks also pass on the unmodified main base on both platforms. All seven remaining vector-helper PRs (#10460, #11295, #11300, #11302, #11304, #11309 and #11333), together with #11289 already in main, merge without content conflicts. Merging the seven in forward and reverse order produces the same tree. That combined revision `a27d73c1f43135378c54ed6477af71273135ec42` also builds and passes both focused checks on Windows and Ubuntu. - The current #10788 head `92db947130efc9e7e12c492683329f2ebc3e1996` merges cleanly with the main base, each individual helper and the seven-helper composition. This is a content-merge check for #10788; its implementation was not part of the combined runtime run. - Conventions, whitespace and `tools/check_main_sync.py --base origin/main --head c862a8f34e900926260b7cbf3fcf1082be2e6ac3 --strict` pass. The sync check is one ahead and zero behind the fetched main base above. Bundled dependencies use that base's pinned revisions; no contribution dependency was introduced. - `public_headers` audits unique declarations and umbrella coverage. Its current upstream 90-second timeout is unchanged. The full set of 64 standalone-header batches and the full CTest suite were not run; the targeted header checks below were added afterward. Additional validation on 27 October 2026, combined revision `a27d73c1f43135378c54ed6477af71273135ec42` (the same seven-helper composition described above): - The five standalone public libc headers (`include/Api.hpp`, `include/exceptions/Runtime.hpp`, `include/exceptions/Unwind.hpp`, `include/SonyCrt.hpp`, and `libc.hpp`), plus a compilation unit including all 368 library umbrellas together, pass with C++20 and `-Werror` on Windows/WinLibs GCC 15.2.0 and Ubuntu/GCC 13.3.0. Every header is included twice, and the existing checker also rejects third-party header dependencies: **6 compilation units per platform**, all pass. This is targeted coverage, not the full 64-batch matrix. - A separate Ubuntu full-project configuration with `ANYPS5_ENABLE_ASAN=ON`, RelWithDebInfo, rebuilt libc and `guest_vector_algorithms_tests`. `ASAN_OPTIONS=halt_on_error=1:detect_leaks=1 ctest --test-dir build-asan-libc-followup-20261027-a -R '^guest_vector_algorithms$' -V --output-on-failure` passed **1/1**, with no AddressSanitizer or LeakSanitizer finding. - These added checks ran on the combined revision, not on seven additional individual builds. The individual Windows/Ubuntu Release results above remain associated with their exact published heads. The earlier differential and negative-control results below belong to their stated heads. The original-module differential was not rerun for this refresh. No console, title or GPU execution and no performance claim. <details> <summary>Earlier implementation validation and provenance</summary> Review follow-up (25 October 2026), published/tested head `62c85f44a6a50b0ffb6ae72e7d6405c5a8c7769f`, base `88f99678bff7345c2a7f83aefcf1b2a8a81c7498`: - Rebased onto current main and resolved the guest-test conflict. Kept main's public-header includes and all its vector-algorithm cases; declared `__std_max_8u` once in `core/libs/prx/libc/include/Api.hpp`, next to the maximum-element declarations. - Removed the rejected-range helper and its six assertions. Production guards and debt remain. Valid unsigned boundaries, tail lengths, offsets, repeated maxima and untouched-input cases remain covered. - Windows 11 / WinLibs GCC 15.2.0 r7 / CMake 4.3.1: built production `libs`, `relinker` and `guest_vector_algorithms_tests`. `ctest --test-dir build -R "^(guest_vector_algorithms|public_headers)$" -V --output-on-failure`: 2/2 pass. An initial header audit while the full build was running exceeded its 30-second limit; the standalone audit passed, and the final CTest run after the build passed in 20.67 seconds without changing the timeout. - Ubuntu 24.04 under WSL2 (kernel 6.6.114.1), GCC 13.3.0, CMake 3.28.3, Release, bundled dependencies, `BUILD_TESTING=ON`: configured the full project from a temporary source copy taken from this head in Ubuntu's filesystem, built the production libc through `guest_vector_algorithms_tests`, and ran the same CTest expression: 2/2 pass; `public_headers` finished in 13.81 seconds. The runtime reported unavailable asynchronous userfaultfd write protection and used its existing memory-comparison fallback. - Repeated the isolated Windows comparison against the title-bundled original and this head's NID-patched production libc: 8,545 cases, zero mismatches, including 256 guard-page cases. No title launch or console measurement. - Conventions and PR-diff whitespace checks pass. The earlier baseline/mutation and import-audit records below refer to the original 24 October validation; invalid-range throw assertions are no longer part of the committed regression. Original 24 October validation: Windows 11 build 26200, AMD Ryzen 7 3700X, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_RELINKER_ONLY=OFF`, `SDL_CCACHE=OFF`. Original 24 October base: `9232ee9c986e54c5c148ef36c729ea4c1c31408e`. Original published head: `676c3ca4f971f1b02c26b979d13c3217b471a454`. Code and tests were validated at `39ff2ddc071afc7f57ee3e5be90b9b0c2653c236`; the final amendment only moves the debt note beside the existing vector-algorithm entry. Both compiled source/test files were byte-identical to original head `676c3ca4f971f1b02c26b979d13c3217b471a454`. - Built production `libs`, `relinker` and `guest_vector_algorithms_tests` on main; the original `guest_vector_algorithms` passes. - Added committed regressions covering individual values, pairwise 32/64-bit and sign-bit boundaries, repeated maxima, lengths around vector/tail boundaries, offsets 0–15, untouched input/sentinels on valid ranges. - Three independently rebuilt negative controls fail: signed comparisons, truncating later elements to 32 bits, and skipping the last element. Restored the exact candidate sources and rebuilt production targets. `ctest --test-dir build -R "^guest_vector_algorithms$" --repeat until-fail:3 -V --timeout 25` passes all three runs without skips. - Native differential: lengths 1–257 at offsets 0–31, 256 cases against inaccessible guard pages at either end, all 64 single-bit boundaries, and `UINT64_MAX`: 8,545 cases, zero mismatches between the original, the candidate reached through its patched NID, and an unsigned-maximum reference. The final restored production binary was compared again successfully. These are host executions of one original function, not console measurements. - Converted the title and three bundled modules in a separate test directory, leaving the established runtime untouched. The import audit now finds `Lg0dYZuDrz4` in built libc. Its conservative source classifier calls it a stub because unsupported-range guards still invoke `NotImplemented`; valid-range behavior was exercised through that exact NID. Other absent imports and throwing functions remain, so no title execution or unblock is claimed. - Conventions, whitespace and the required overlap scan pass as described below. The original run did not cover Linux/macOS, a console, the full CTest suite, title execution, GPU or performance; the Linux follow-up is recorded above. Original 24 October overlap: the final required scan reports no confirmed overlap. The first scan found only three confirmed debt-note insertions (#8937, #10129, #10134); moving this note beside the vector entry separates them. The stale shared-file comparisons were inspected against each branch's merge base: all shared changes are in `docs/dev/debt/libc.md`, with no changed vector-algorithm or `__std_max_8u` entry. The inspected PRs were #3965, #5021, #5303, #7081, #7544, #7648, #7715, #8150, #8306, #8417, #8863, #8965, #9133, #9232, #9408, #9447, #9526, #9527, #9552, #9669, #9833, #9844, #9873, #9929, #10002, #10003, #10007, #10113, #10226, #10229, #10234, #10245, #10247, #10253, #10265, #10274, #10283, #10306, #10314, #10315, #10316, #10317, #10321, #10325, #10328, #10346 and #10349. Their stale branches are not claimed merge-clean. No runtime dependency on those PRs is introduced. </details> </details> <!-- 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. --> ### 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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none confirmed; PPSA03671 #5516 imports this function, but other dependencies remain and the title was not run - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-24 02:18:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T02:18:17Z.

Review: APPROVED


Reviewed head 676c3ca4f971f1b02c26b979d13c3217b471a454. The implementation matches the reported unsigned 64-bit value-returning ABI, handles unaligned reads via memcpy, and rejects malformed ranges before entering the scan loop. The regression cases cover unsigned/sign boundaries, varied lengths and alignments, input preservation, and invalid ranges; the PR also reports a differential run against the title-bundled export. All eligible hosted checks pass; Linux and Windows product jobs are skipped by workflow policy. I found no blocking issue in this scoped implementation.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636390836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10460#pullrequestreview-5636390836). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T02:18:17Z. **Review:** APPROVED --- Reviewed head 676c3ca4f971f1b02c26b979d13c3217b471a454. The implementation matches the reported unsigned 64-bit value-returning ABI, handles unaligned reads via memcpy, and rejects malformed ranges before entering the scan loop. The regression cases cover unsigned/sign boundaries, varied lengths and alignments, input preservation, and invalid ranges; the PR also reports a differential run against the title-bundled export. All eligible hosted checks pass; Linux and Windows product jobs are skipped by workflow policy. I found no blocking issue in this scoped implementation.
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!10460
No description provided.