feat(libSceNKWebKitRequirements): implement the zlib exports #14374

Merged
justdoston merged 4 commits from upstream-pr/14374 into main 2026-11-07 04:32:16 +00:00
justdoston commented 2026-11-01 10:48:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by justdoston on 2026-11-01T10:48:31Z.


What

Implements the ten zlib exports of libSceNKWebKitRequirements: deflateInit2_, deflate, deflateReset, deflateEnd, deflateBound, inflateInit2_, inflate, inflateReset, inflateEnd and uncompress (libSceNKWebKitRequirements 0/165 → 10/165; libraries 8981 → 8991 of 34237, 26.23% → 26.26%).

  • The NIDs (fKk7unahoVM, gnWUEMlAxZY, mhD00YrjSbg, Z0pL-Tae6N4, VCIAd+nrADw, MM-aVBE7p-A, dbDvWQUel6A, sUO777nQSTQ, XVx6JyC0Mv4, ROw6faazl58) are in the PS5 3.20 inventory and hash to those zlib names (#13745). Prototypes follow zlib.h 1.3.1; uncompress follows the uncompr.c contract. Not measured on a console.
  • The backend is the vendored zlib 1.3.2 of libjpeg-turbo, as libSceZlib uses. The guest z_stream is a 112-byte LP64 struct (GuestZStream, offsets asserted). It is not passed to host zlib directly: on Windows uLong is 32-bit and the guest zalloc/zfree use the System V ABI. Each stream owns a host z_stream. The guest state field points at it, and a back-pointer check returns Z_STREAM_ERROR for a copied or foreign stream, as zlib's strm->state->strm != strm check does.
  • Guest allocators are called through APS5_VABI trampolines. Null zalloc/zfree are replaced by APS5_VABI default allocators, as zlib fills in its own, so the guest never receives a host-ABI function pointer.
  • total_in/total_out stay 64-bit in the guest. Each call applies the host delta. zlib reads the low 32 bits of total_in (the gzip trailer), so the value is also synced into the host stream.
  • When init fails, state is left alone, cleared or set exactly as zlib does. A rejected deflate parameter leaves it unchanged; a rejected inflate window clears it.
  • deflateBound uses deflateBound_z, so 64-bit lengths don't truncate on Windows.
  • uncompress handles 64-bit lengths in uInt chunks. Its Z_BUF_ERROR/Z_DATA_ERROR results for a zero-length destination, a short destination and truncated input match system zlib.
  • Gap (in debt): the vendored zlib is built with NO_GZIP, so a valid gzip or auto-detect windowBits throws instead of returning a wrong error. Invalid windowBits values still return Z_STREAM_ERROR.

Overlap: tools/pr_overlap.py reports only #14212 (docs(debt): drops export totals and adds blank lines across debt files), which edits the same libSceNKWebKitRequirements.md paragraph where this PR changes 133/122 to 123/112 and moves zlib out of the pending names. It implements no functions; the conflict is textual, and whichever merges second can take the other's wording.

Tested

Ubuntu 24.04, GCC 13.3. New test guest_webkit_zlib (core/libs/tests/GuestWebKitZlib.cpp), built standalone with Zlib.cpp, the vendored zlib sources, -fsanitize=address,undefined -fno-sanitize-recover=undefined: passes in 0.24 s with no leaks or UB reports. It covers:

  • zlib, raw and 9-bit window round trips at 1-, 7- and 4096-byte chunks, with totals, adler32, reset reproducibility and allocator balance through a counting guest allocator
  • version, size, null-stream, bad-level, bad-window, bad-flush, copied-stream and wrong-direction errors, plus state handling on failed init
  • deflateBound exact values (1013, 1151, saturation)
  • uncompress edge cases, with expected values taken from system zlib 1.3 through ctypes
  • gzip windowBits throwing

The full CMake build was not run locally (SDL's X11/audio dev packages are missing on this machine), so guest_webkit_zlib has not run under CTest or on Windows. python3 tools/check_conventions.py --base origin/main, core/libs/tests/test_public_headers.py --audit-only and tools/tests/test_progress.py pass. No title tested.

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
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5106617941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14374). Originally posted by [justdoston](https://github.com/justdoston) on 2026-11-01T10:48:31Z. --- ### What Implements the ten zlib exports of libSceNKWebKitRequirements: `deflateInit2_`, `deflate`, `deflateReset`, `deflateEnd`, `deflateBound`, `inflateInit2_`, `inflate`, `inflateReset`, `inflateEnd` and `uncompress` (libSceNKWebKitRequirements 0/165 → 10/165; libraries 8981 → 8991 of 34237, 26.23% → 26.26%). - The NIDs (`fKk7unahoVM`, `gnWUEMlAxZY`, `mhD00YrjSbg`, `Z0pL-Tae6N4`, `VCIAd+nrADw`, `MM-aVBE7p-A`, `dbDvWQUel6A`, `sUO777nQSTQ`, `XVx6JyC0Mv4`, `ROw6faazl58`) are in the [PS5 3.20 inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/main/libSceNKWebKitRequirements.c) and hash to those zlib names (#13745). Prototypes follow [zlib.h 1.3.1](https://github.com/madler/zlib/blob/51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf/zlib.h); `uncompress` follows the [uncompr.c](https://github.com/madler/zlib/blob/51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf/uncompr.c) contract. Not measured on a console. - The backend is the vendored zlib 1.3.2 of libjpeg-turbo, as libSceZlib uses. The guest `z_stream` is a 112-byte LP64 struct (`GuestZStream`, offsets asserted). It is not passed to host zlib directly: on Windows `uLong` is 32-bit and the guest `zalloc`/`zfree` use the System V ABI. Each stream owns a host `z_stream`. The guest `state` field points at it, and a back-pointer check returns `Z_STREAM_ERROR` for a copied or foreign stream, as zlib's `strm->state->strm != strm` check does. - Guest allocators are called through `APS5_VABI` trampolines. Null `zalloc`/`zfree` are replaced by `APS5_VABI` default allocators, as zlib fills in its own, so the guest never receives a host-ABI function pointer. - `total_in`/`total_out` stay 64-bit in the guest. Each call applies the host delta. zlib reads the low 32 bits of `total_in` (the gzip trailer), so the value is also synced into the host stream. - When init fails, `state` is left alone, cleared or set exactly as zlib does. A rejected deflate parameter leaves it unchanged; a rejected inflate window clears it. - `deflateBound` uses `deflateBound_z`, so 64-bit lengths don't truncate on Windows. - `uncompress` handles 64-bit lengths in `uInt` chunks. Its `Z_BUF_ERROR`/`Z_DATA_ERROR` results for a zero-length destination, a short destination and truncated input match system zlib. - Gap (in debt): the vendored zlib is built with `NO_GZIP`, so a valid gzip or auto-detect `windowBits` throws instead of returning a wrong error. Invalid `windowBits` values still return `Z_STREAM_ERROR`. Overlap: `tools/pr_overlap.py` reports only #14212 (`docs(debt)`: drops export totals and adds blank lines across debt files), which edits the same `libSceNKWebKitRequirements.md` paragraph where this PR changes 133/122 to 123/112 and moves zlib out of the pending names. It implements no functions; the conflict is textual, and whichever merges second can take the other's wording. ### 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. --> Ubuntu 24.04, GCC 13.3. New test `guest_webkit_zlib` (`core/libs/tests/GuestWebKitZlib.cpp`), built standalone with `Zlib.cpp`, the vendored zlib sources, `-fsanitize=address,undefined -fno-sanitize-recover=undefined`: passes in 0.24 s with no leaks or UB reports. It covers: - zlib, raw and 9-bit window round trips at 1-, 7- and 4096-byte chunks, with totals, adler32, reset reproducibility and allocator balance through a counting guest allocator - version, size, null-stream, bad-level, bad-window, bad-flush, copied-stream and wrong-direction errors, plus state handling on failed init - `deflateBound` exact values (1013, 1151, saturation) - `uncompress` edge cases, with expected values taken from system zlib 1.3 through ctypes - gzip `windowBits` throwing The full CMake build was not run locally (SDL's X11/audio dev packages are missing on this machine), so `guest_webkit_zlib` has not run under CTest or on Windows. `python3 tools/check_conventions.py --base origin/main`, `core/libs/tests/test_public_headers.py --audit-only` and `tools/tests/test_progress.py` pass. No title tested. ### 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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-01 10:56:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T10:56:00Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The guest zlib bridge can leave stale upper bits in GuestZStream::adler on Windows when the host uLong is 32-bit.

What I ran

Reviewed open PR #14374 at head d95df1c6474f2e4b5f0249622c36bf2dbb91b40a, based on main at e6f57307fa7f47165d7fc1bee945abdb2f6816e7. The no-build stack preview against current main e67cc818696fd6e6c58ac80adc6550c54aed68e8 was clean. Environment: Linux x86_64, Python 3.11.2; no compiler was invoked.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374
git diff --check e6f57307fa7f47165d7fc1bee945abdb2f6816e7...d95df1c6474f2e4b5f0249622c36bf2dbb91b40a
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head d95df1c6474f2e4b5f0249622c36bf2dbb91b40a --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-14374-exact --json core/libs/tests/GuestWebKitZlib.cpp
python3 core/libs/tests/test_public_headers.py --audit-only

The test-quality and public-header commands ran from the exact-head snapshot at /tmp/anyps5-14374-exact.

Results

Check Result
Diff check Passed.
Conventions and PR template Passed in the precheck.
Export/declaration audit Passed: 167 symbols, no findings.
Public-header audit Passed: 399 libraries and 26,181 exports.
Test registration Confirmed guest_webkit_zlib is registered in the changed CMake file. The test-quality helper's possible-unregistered warning is a false positive.
Test quality No other heuristic finding. I inspected the assertions; no C++ test binary was run.
Stack / current-main merge preview Clean against e67cc818696fd6e6c58ac80adc6550c54aed68e8.
Hosted CI All six checks were pending at the last query; none is reported as passing.
Unedited selected command output

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374:

/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14374-d95df1c6474f/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14374-d95df1c6474f/report.json
Conclusion: checks failed

The precheck report shows its ABI and test-quality subprocesses could not run because those local helper files are absent from the isolated PR snapshot; I ran both available helpers directly afterward.

python3 tools/pr_abi_audit.py ... --json summary:

status passed
symbols 167
findings []

python3 tools/pr_test_quality.py ...:

{"findings":[{"path":"core/libs/tests/GuestWebKitZlib.cpp","line":1,"kind":"possible-unregistered-cpp-test","message":"Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."}],"negative_control_candidates":[],"limits":["Heuristics can miss weak assertions and can flag valid tests; inspect every finding.","A test that passes against base is not by itself proof that the PR test is inadequate.","Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."]}

python3 core/libs/tests/test_public_headers.py --audit-only:

399 libraries, 26181 exports: unique declarations and umbrella coverage verified

git diff --check ... produced no output and exited 0.

Findings

Blocking: In Zlib.cpp, Store() compares stream.adler with static_cast<uLong>(guest.adler) before deciding whether to write the result back. On Windows, where host uLong is 32-bit, a guest value such as 0x1_00000001 truncates to 1; zlib initialization resets the checksum to 1, so the comparison treats the values as equal and leaves the stale upper 32 bits in the guest-visible 64-bit field. Please compare in guest width (or always store the host value), and add a regression that seeds the upper bits before initialization and checks the result on a 32-bit-uLong host.

    if (guest.adler != static_cast<std::uint64_t>(stream.adler)) guest.adler = stream.adler;

Sources

Not verified

I did not compile or run C++ tests/CTest, test on Windows, or verify console behavior. The author reports a standalone Ubuntu ASan/UBSan run, but I did not independently reproduce it. Hosted checks were pending at the last query.

To get this to a good state

Normalize the guest-visible checksum after host operations and add the high-bit regression. I will rerun the same no-build checks on the new head; build-dependent tests remain outside the initial-review check set.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727682431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14374#pullrequestreview-5727682431). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T10:56:00Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The guest zlib bridge can leave stale upper bits in `GuestZStream::adler` on Windows when the host `uLong` is 32-bit. ## What I ran Reviewed open PR #14374 at head `d95df1c6474f2e4b5f0249622c36bf2dbb91b40a`, based on `main` at `e6f57307fa7f47165d7fc1bee945abdb2f6816e7`. The no-build stack preview against current `main` `e67cc818696fd6e6c58ac80adc6550c54aed68e8` was clean. Environment: Linux x86_64, Python 3.11.2; no compiler was invoked. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374 git diff --check e6f57307fa7f47165d7fc1bee945abdb2f6816e7...d95df1c6474f2e4b5f0249622c36bf2dbb91b40a python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head d95df1c6474f2e4b5f0249622c36bf2dbb91b40a --json python3 tools/pr_test_quality.py --root /tmp/anyps5-14374-exact --json core/libs/tests/GuestWebKitZlib.cpp python3 core/libs/tests/test_public_headers.py --audit-only ``` The test-quality and public-header commands ran from the exact-head snapshot at `/tmp/anyps5-14374-exact`. ## Results | Check | Result | |---|---| | Diff check | Passed. | | Conventions and PR template | Passed in the precheck. | | Export/declaration audit | Passed: 167 symbols, no findings. | | Public-header audit | Passed: 399 libraries and 26,181 exports. | | Test registration | Confirmed `guest_webkit_zlib` is registered in the changed CMake file. The test-quality helper's possible-unregistered warning is a false positive. | | Test quality | No other heuristic finding. I inspected the assertions; no C++ test binary was run. | | Stack / current-main merge preview | Clean against `e67cc818696fd6e6c58ac80adc6550c54aed68e8`. | | Hosted CI | All six checks were pending at the last query; none is reported as passing. | <details><summary>Unedited selected command output</summary> `python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374`: ```text /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14374-d95df1c6474f/report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14374-d95df1c6474f/report.json Conclusion: checks failed ``` The precheck report shows its ABI and test-quality subprocesses could not run because those local helper files are absent from the isolated PR snapshot; I ran both available helpers directly afterward. `python3 tools/pr_abi_audit.py ... --json` summary: ```text status passed symbols 167 findings [] ``` `python3 tools/pr_test_quality.py ...`: ```json {"findings":[{"path":"core/libs/tests/GuestWebKitZlib.cpp","line":1,"kind":"possible-unregistered-cpp-test","message":"Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."}],"negative_control_candidates":[],"limits":["Heuristics can miss weak assertions and can flag valid tests; inspect every finding.","A test that passes against base is not by itself proof that the PR test is inadequate.","Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."]} ``` `python3 core/libs/tests/test_public_headers.py --audit-only`: ```text 399 libraries, 26181 exports: unique declarations and umbrella coverage verified ``` `git diff --check ...` produced no output and exited 0. </details> ## Findings **Blocking:** In `Zlib.cpp`, `Store()` compares `stream.adler` with `static_cast<uLong>(guest.adler)` before deciding whether to write the result back. On Windows, where host `uLong` is 32-bit, a guest value such as `0x1_00000001` truncates to `1`; zlib initialization resets the checksum to `1`, so the comparison treats the values as equal and leaves the stale upper 32 bits in the guest-visible 64-bit field. Please compare in guest width (or always store the host value), and add a regression that seeds the upper bits before initialization and checks the result on a 32-bit-`uLong` host. ```suggestion if (guest.adler != static_cast<std::uint64_t>(stream.adler)) guest.adler = stream.adler; ``` ## Sources - [Bridge comparison and 64-bit guest field at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d95df1c6474f2e4b5f0249622c36bf2dbb91b40a/core/libs/prx/libSceNKWebKitRequirements/Zlib.cpp#L62-L79), [guest layout](https://github.com/boykopovar/AnyPS5/blob/d95df1c6474f2e4b5f0249622c36bf2dbb91b40a/core/libs/prx/libSceNKWebKitRequirements/include/GuestZStream.hpp#L17-L36). - [Pinned zlib 1.3.1 `deflateResetKeep` checksum initialization](https://github.com/madler/zlib/blob/51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf/deflate.c#L635-L665). ## Not verified I did not compile or run C++ tests/CTest, test on Windows, or verify console behavior. The author reports a standalone Ubuntu ASan/UBSan run, but I did not independently reproduce it. Hosted checks were pending at the last query. ## To get this to a good state Normalize the guest-visible checksum after host operations and add the high-bit regression. I will rerun the same no-build checks on the new head; build-dependent tests remain outside the initial-review check set.
MarcZX10 commented 2026-11-01 11:49:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T11:49:26Z.

Review: COMMENTED


Re-checked — new head, Store fix confirmed

At 3979b705f3 the guest adler comparison is done at full 64-bit width, which resolves the stale-upper-bits problem in my earlier request at d95df1c647; approval waits for hosted Windows results at this head.

What I ran

Exact head 3979b705f3b87d75827d036a587be8c37bc6f148, PR base e6f57307fa7f47165d7fc1bee945abdb2f6816e7. The no-build stack preview against current main was clean. No build, compile or C++ test was run.

cd /marc/AnyPS5
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374
python3 tools/pr_abi_audit.py --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head 3979b705f3b87d75827d036a587be8c37bc6f148 --json
git archive 3979b705f3b87d75827d036a587be8c37bc6f148 core/libs/tests/GuestWebKitZlib.cpp core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt | tar -x -C /tmp/claude-0/reviewer-run-20261101-1140/tq-14374
python3 tools/pr_test_quality.py --root /tmp/claude-0/reviewer-run-20261101-1140/tq-14374 --json core/libs/tests/GuestWebKitZlib.cpp

The precheck's ABI and test-quality helpers could not run in its isolated head tree, so I ran both by hand from /marc/AnyPS5, as shown above.

Results

Check Result
Precheck diff check passed
Precheck conventions and PR template passed
Precheck live dependency and mergeability passed
Changed-export ABI audit, by hand passed: 167 symbols, 0 findings
Test-quality heuristic, by hand one finding: GuestWebKitZlib.cpp not found literally in CMake. False positive: core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt:9 registers it as guest_webkit_zlib_tests through ${LIBS_INCLUDE_DIR}/tests/GuestWebKitZlib.cpp
Source check of Store() Zlib.cpp:114 now reads if (guest.adler != static_cast<std::uint64_t>(stream.adler)) guest.adler = stream.adler;. GuestZStream.hpp:27 declares std::uint64_t adler, so the comparison is full width and a stale upper half is overwritten
Hosted CI at this head conventions, intake, labels, eligibility, library-portability and report were pending at review time

Findings

Blocking: none.

Non-blocking: none new at this head.

Not verified

  • The licence and notice header that the author says was copied verbatim from zlib 1.3.1 (51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf) was not compared with upstream text here.
  • No Windows run was done here. The Windows LLP64 case the earlier request described is a platform behavior, so it depends on the hosted Windows results or a Windows run at 3979b705f3.
  • The author's standalone ASan and UBSan results are author-reported and were not reproduced.

To get this to a good state

Nothing further is needed from the author for the source point. Approval waits for the hosted Windows results at 3979b705f3, and for the licence text to be confirmed against upstream.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727902446 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14374#pullrequestreview-5727902446). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T11:49:26Z. **Review:** COMMENTED --- # Re-checked — new head, Store fix confirmed At `3979b705f3` the guest `adler` comparison is done at full 64-bit width, which resolves the stale-upper-bits problem in my earlier request at `d95df1c647`; approval waits for hosted Windows results at this head. ## What I ran Exact head `3979b705f3b87d75827d036a587be8c37bc6f148`, PR base `e6f57307fa7f47165d7fc1bee945abdb2f6816e7`. The no-build stack preview against current `main` was clean. No build, compile or C++ test was run. ```sh cd /marc/AnyPS5 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374 python3 tools/pr_abi_audit.py --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head 3979b705f3b87d75827d036a587be8c37bc6f148 --json git archive 3979b705f3b87d75827d036a587be8c37bc6f148 core/libs/tests/GuestWebKitZlib.cpp core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt | tar -x -C /tmp/claude-0/reviewer-run-20261101-1140/tq-14374 python3 tools/pr_test_quality.py --root /tmp/claude-0/reviewer-run-20261101-1140/tq-14374 --json core/libs/tests/GuestWebKitZlib.cpp ``` The precheck's ABI and test-quality helpers could not run in its isolated head tree, so I ran both by hand from `/marc/AnyPS5`, as shown above. ## Results | Check | Result | |---|---| | Precheck diff check | passed | | Precheck conventions and PR template | passed | | Precheck live dependency and mergeability | passed | | Changed-export ABI audit, by hand | passed: 167 symbols, 0 findings | | Test-quality heuristic, by hand | one finding: `GuestWebKitZlib.cpp` not found literally in CMake. False positive: `core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt:9` registers it as `guest_webkit_zlib_tests` through `${LIBS_INCLUDE_DIR}/tests/GuestWebKitZlib.cpp` | | Source check of `Store()` | `Zlib.cpp:114` now reads `if (guest.adler != static_cast<std::uint64_t>(stream.adler)) guest.adler = stream.adler;`. `GuestZStream.hpp:27` declares `std::uint64_t adler`, so the comparison is full width and a stale upper half is overwritten | | Hosted CI at this head | conventions, intake, labels, eligibility, library-portability and report were pending at review time | ## Findings **Blocking:** none. **Non-blocking:** none new at this head. ## Not verified - The licence and notice header that the author says was copied verbatim from zlib 1.3.1 (`51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf`) was not compared with upstream text here. - No Windows run was done here. The Windows LLP64 case the earlier request described is a platform behavior, so it depends on the hosted Windows results or a Windows run at `3979b705f3`. - The author's standalone ASan and UBSan results are author-reported and were not reproduced. ## To get this to a good state Nothing further is needed from the author for the source point. Approval waits for the hosted Windows results at `3979b705f3`, and for the licence text to be confirmed against upstream.
MarcZX10 commented 2026-11-01 12:44:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T12:44:05Z.

Review: APPROVED


Reviewed — looks good

The zlib exports at 3979b705f3 compare the adler checksum as a full 64-bit guest field, which fixes the earlier changes-requested finding, and the hosted Windows run for this exact head passed all 2586 CTest tests, including guest_webkit_zlib; I approve.

What I ran

Exact head 3979b705f3b87d75827d036a587be8c37bc6f148; PR base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 (precheck base), unchanged at completion. No local build and no local test run. Commands:

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374
python3 tools/pr_abi_audit.py --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head 3979b705f3b87d75827d036a587be8c37bc6f148 --json
python3 tools/pr_test_quality.py --root <git archive of 3979b705f3: core/libs/tests, core/libs/prx/libSceNKWebKitRequirements, core/libs/CMakeLists.txt> --json core/libs/tests/GuestWebKitZlib.cpp

The precheck's ABI and test-quality helpers were missing from the isolated head tree, so both were run by hand. I also compared the licence notice in Zlib.cpp line by line with zlib 1.3.1 zlib.h at 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf: all 10 licence lines match verbatim.

Results

Check Result
Diff check (precheck) Passed
Conventions and PR template (precheck) Passed
Live dependency and mergeability (precheck) Passed
ABI audit (by hand) Passed, 0 findings
Test-quality heuristic (by hand) One possible-unregistered-cpp-test finding; false positive, because guest_webkit_zlib is registered in core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt L9-L10
Hosted Windows, job at this head Success; 100% of 2586 CTest tests passed, including guest_webkit_zlib
Hosted eligibility, conventions, labels, report, library-portability Success
Hosted Linux, relinker, relinker-asan, register-context, write-watch Skipped by path selection
Unedited hosted log lines (Windows job)
1890/2586 Test #2351: guest_webkit_zlib ........................................................   Passed    0.02 sec
100% tests passed, 0 tests failed out of 2586

Findings

Blocking: none.

Non-blocking:

  1. The author reports standalone ASan and UBSan runs of the zlib exports. Those were not reproduced here.

What I read: the checksum compare in Zlib.cpp (the guest field is compared at full 64-bit width and normalised when it differs), the 64-bit adler field in GuestZStream.hpp, and the uncompress adaptation of zlib 1.3.1 uncompr.c, which the file header names.

Sources

Not verified

  • No local build or test run; the Windows result above is the hosted run for this head.
  • Linux and the sanitizer jobs were skipped for this head by path selection.
  • The console's zlib version and behaviour are not verified (the debt entry says so).

To get this to a good state

No change is needed for the approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5728108672 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14374#pullrequestreview-5728108672). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T12:44:05Z. **Review:** APPROVED --- # Reviewed — looks good The zlib exports at `3979b705f3` compare the adler checksum as a full 64-bit guest field, which fixes the earlier changes-requested finding, and the hosted Windows run for this exact head passed all 2586 CTest tests, including `guest_webkit_zlib`; I approve. ## What I ran Exact head `3979b705f3b87d75827d036a587be8c37bc6f148`; PR base `e6f57307fa7f47165d7fc1bee945abdb2f6816e7` (precheck base), unchanged at completion. No local build and no local test run. Commands: ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14374 python3 tools/pr_abi_audit.py --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head 3979b705f3b87d75827d036a587be8c37bc6f148 --json python3 tools/pr_test_quality.py --root <git archive of 3979b705f3: core/libs/tests, core/libs/prx/libSceNKWebKitRequirements, core/libs/CMakeLists.txt> --json core/libs/tests/GuestWebKitZlib.cpp ``` The precheck's ABI and test-quality helpers were missing from the isolated head tree, so both were run by hand. I also compared the licence notice in `Zlib.cpp` line by line with zlib 1.3.1 `zlib.h` at `51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf`: all 10 licence lines match verbatim. ## Results | Check | Result | |---|---| | Diff check (precheck) | Passed | | Conventions and PR template (precheck) | Passed | | Live dependency and mergeability (precheck) | Passed | | ABI audit (by hand) | Passed, 0 findings | | Test-quality heuristic (by hand) | One `possible-unregistered-cpp-test` finding; false positive, because `guest_webkit_zlib` is registered in `core/libs/prx/libSceNKWebKitRequirements/CMakeLists.txt` L9-L10 | | Hosted Windows, job at this head | Success; 100% of 2586 CTest tests passed, including `guest_webkit_zlib` | | Hosted eligibility, conventions, labels, report, library-portability | Success | | Hosted Linux, relinker, relinker-asan, register-context, write-watch | Skipped by path selection | <details><summary>Unedited hosted log lines (Windows job)</summary> ```text 1890/2586 Test #2351: guest_webkit_zlib ........................................................ Passed 0.02 sec 100% tests passed, 0 tests failed out of 2586 ``` </details> ## Findings **Blocking:** none. **Non-blocking:** 1. The author reports standalone ASan and UBSan runs of the zlib exports. Those were not reproduced here. What I read: the checksum compare in `Zlib.cpp` (the guest field is compared at full 64-bit width and normalised when it differs), the 64-bit `adler` field in `GuestZStream.hpp`, and the `uncompress` adaptation of zlib 1.3.1 `uncompr.c`, which the file header names. ## Sources - [zlib 1.3.1 `zlib.h` licence text at the pinned commit](https://github.com/madler/zlib/blob/51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf/zlib.h) - [`Zlib.cpp` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3979b705f3b87d75827d036a587be8c37bc6f148/core/libs/prx/libSceNKWebKitRequirements/Zlib.cpp) ## Not verified - No local build or test run; the Windows result above is the hosted run for this head. - Linux and the sanitizer jobs were skipped for this head by path selection. - The console's zlib version and behaviour are not verified (the debt entry says so). ## To get this to a good state No change is needed for the approval.
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!14374
No description provided.