feat(libSceNKWebKit): implement the exports the 11.00 module leaves empty #13930

Merged
edubox merged 21 commits from upstream-pr/13930 into main 2026-11-06 15:38:01 +00:00
edubox commented 2026-10-31 13:05:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-10-31T13:05:29Z.


What

357 exports that Export.cpp declared as throwing stubs do nothing in the PS5 11.00 libSceNKWebKit: at each export address the code in the firmware image is a single ret, so the console ignores the call. ret writes no return register, so a zero result would be this library's invention, not the module's behaviour. The batch is split:

  • 154 exports have a known void contract and are empty functions in src/NoOpExports.cpp: 113 destructors and 2 constructors (the Itanium C++ ABI fixes their return type) and 39 functions the current WebKit public C API headers declare void, including WKIconDatabaseEnableDatabaseCleanup.
  • 203 exports keep throwing: 152 C++ functions whose return type the mangled name does not encode and 51 C API functions whose headers declare a value return or that are absent from those headers, so there is no evidence either way.

The set was built by recomputing each declared symbol's NID, looking it up in the 11.00 dynamic symbol table and keeping only entries whose body is exactly ret (all 357 checked byte by byte). The declarations live once in include/NoOpExports.hpp, which the umbrella header reaches.

docs/dev/debt/libSceNKWebKit.md drops the 153 inventory rows that no longer throw (7,366 → 7,213 of the 8,703 listed declarations; the prototype-unknown group stays at 126) and gains an entry with the measurement and the void/unknown split. Only 11.00 was measured; other module versions and the true prototypes stay unverified.

The reproducibility material is in https://gist.github.com/edubox/323bbb1210275d600736ac2c1dff8f16: the extraction/check script, the module SHA-256 3af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d and one row per export with name, NID, vaddr, file offset, size, bytes and verdict.

Review evidence

Across the 30 dumped titles' relinker registries, zero reference libSceNKWebKit (rg -l libSceNKWebKit registries/*.registry.json returns nothing), so no title ID or title log line exists for these exports. "Unblocks: none" is accurate.

The 11.00 module is the only revision available here; no other module version was supplied or found, so the bare-ret bodies (including the 113 destructors) are verified only against that image, with one row per export in the gist. Whether an export-only change like this should be kept or closed is a maintainer decision; this PR does not claim a title and has not been closed.

Tested

  • Linux, GCC 16.2.1, rebased on main 5cb015caaa: ctest -R 'nkwebkit|guest_nkwebkit' 10/10 passed, including the new nkwebkit_noops. It calls the 154 void exports through the public header and checks that they add no NotImplemented calls.
  • python3 tools/check_conventions.py --base origin/main: passed.
  • python3 tools/pr_overlap.py --branch feat/nkwebkit-no-op-exports --jobs 32: #13515, #13744, #13766, #13770 and #13772 share Export.cpp and the debt file textually, so the comparison could not complete; I read their diffs and none of them implements any of these 357 exports (they add 6 other exports). Merge conflicts are expected in Export.cpp and the debt inventory, and both sets must survive whichever lands second.
  • Not tested in a game: none of my converted titles imports libSceNKWebKit (checked their relinker registries), so the 11.00 module is the only evidence.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097759547 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13930). Originally posted by [edubox](https://github.com/edubox) on 2026-10-31T13:05:29Z. --- ### What 357 exports that `Export.cpp` declared as throwing stubs do nothing in the PS5 11.00 `libSceNKWebKit`: at each export address the code in the firmware image is a single `ret`, so the console ignores the call. `ret` writes no return register, so a zero result would be this library's invention, not the module's behaviour. The batch is split: - 154 exports have a known `void` contract and are empty functions in `src/NoOpExports.cpp`: 113 destructors and 2 constructors (the Itanium C++ ABI fixes their return type) and 39 functions the current WebKit public C API headers declare `void`, including `WKIconDatabaseEnableDatabaseCleanup`. - 203 exports keep throwing: 152 C++ functions whose return type the mangled name does not encode and 51 C API functions whose headers declare a value return or that are absent from those headers, so there is no evidence either way. The set was built by recomputing each declared symbol's NID, looking it up in the 11.00 dynamic symbol table and keeping only entries whose body is exactly `ret` (all 357 checked byte by byte). The declarations live once in `include/NoOpExports.hpp`, which the umbrella header reaches. `docs/dev/debt/libSceNKWebKit.md` drops the 153 inventory rows that no longer throw (7,366 → 7,213 of the 8,703 listed declarations; the prototype-unknown group stays at 126) and gains an entry with the measurement and the void/unknown split. Only 11.00 was measured; other module versions and the true prototypes stay unverified. The reproducibility material is in https://gist.github.com/edubox/323bbb1210275d600736ac2c1dff8f16: the extraction/check script, the module SHA-256 `3af992253665387feeb5df90ff27dff683e3aa270cc4d92a0535b46ab18fa20d` and one row per export with name, NID, vaddr, file offset, size, bytes and verdict. ### Review evidence Across the 30 dumped titles' relinker registries, zero reference `libSceNKWebKit` (`rg -l libSceNKWebKit registries/*.registry.json` returns nothing), so no title ID or title log line exists for these exports. "Unblocks: none" is accurate. The 11.00 module is the only revision available here; no other module version was supplied or found, so the bare-`ret` bodies (including the 113 destructors) are verified only against that image, with one row per export in the gist. Whether an export-only change like this should be kept or closed is a maintainer decision; this PR does not claim a title and has not been closed. ### Tested - Linux, GCC 16.2.1, rebased on `main` `5cb015caaa`: `ctest -R 'nkwebkit|guest_nkwebkit'` **10/10** passed, including the new `nkwebkit_noops`. It calls the 154 void exports through the public header and checks that they add no `NotImplemented` calls. - `python3 tools/check_conventions.py --base origin/main`: passed. - `python3 tools/pr_overlap.py --branch feat/nkwebkit-no-op-exports --jobs 32`: #13515, #13744, #13766, #13770 and #13772 share `Export.cpp` and the debt file textually, so the comparison could not complete; I read their diffs and none of them implements any of these 357 exports (they add 6 other exports). Merge conflicts are expected in `Export.cpp` and the debt inventory, and both sets must survive whichever lands second. - Not tested in a game: none of my converted titles imports `libSceNKWebKit` (checked their relinker registries), so the 11.00 module is the only evidence. ### Checklist - [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
CnRJay commented 2026-11-01 19:51:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:51:04Z.

Review: COMMENTED


The method (recomputing the NIDs and keeping only entries whose 11.00 body is exactly ret) is sound, and keeping the 177 unknown-prototype exports throwing is the right call. Two things stand:

  1. 357 exports moved from throw to silent return is a large behavioural change for any caller. Say which of them a title imports, or state that none is known.

  2. The no-op set was measured on 11.00 only and the PR says other module versions are unverified. Say what happens on the other revisions that ship the library.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729927675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13930#pullrequestreview-5729927675). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:51:04Z. **Review:** COMMENTED --- The method (recomputing the NIDs and keeping only entries whose 11.00 body is exactly `ret`) is sound, and keeping the 177 unknown-prototype exports throwing is the right call. Two things stand: 1. 357 exports moved from throw to silent return is a large behavioural change for any caller. Say which of them a title imports, or state that none is known. 2. The no-op set was measured on 11.00 only and the PR says other module versions are unverified. Say what happens on the other revisions that ship the library.
XairRrR commented 2026-11-03 09:29:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T09:29:15Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The PR merges and builds cleanly, the new nkwebkit_noops test passes, and it fails when the 180 bodies throw as they did on main. However, 26 of the 65 C API exports the PR declares void (it says "the current WebKit C API headers declare void") actually return a value, so they belong in the group that keeps throwing.

What I ran

Head 16bbbb24faad0a1a019aa5c7b1d8de5dff43af9d, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 00c2720cd6f55fc562ad477280bde0fbe54cc682.

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...16bbbb24faad0a1a019aa5c7b1d8de5dff43af9d
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32
# negative control 1: main production files, new NoOpExports.{hpp,cpp} moved aside
ninja -C build -j32 -l32 nkwebkit_noops_tests
# negative control 2: merged tree, every body in src/NoOpExports.cpp calls NotImplemented_nid_no_patch(__func__)
ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit
ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$'
# restore merged tree
ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit
ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$'
git status --porcelain
ctest --test-dir build --output-on-failure -R public_headers

(The build tree had to be regenerated for the negative control because the controls change the file set that the source globs pick up. The sandbox stopped CMake from rewriting configure outputs owned by another user, so I replaced those generated files with copies that keep their timestamps, then reran cmake. No source file was involved.)

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Script build (Release, GCC 14.2.0) ok
Script tests (832 run) no new failures, no timeouts. 1 known failure on main (unwrap_self_..._destination_directory_group), unrelated
ctest -R nkwebkit 12/12 passed (nkwebkit_noops 0.01 s)
ctest -R public_headers 65/65 passed (172 s in total across the 65 tests, run one after another)
Negative control 1 test fails to compile (header missing)
Negative control 2 (bodies throw) nkwebkit_noops fails (Subprocess aborted)
After restore nkwebkit_noops passes, git status --porcelain empty
Vulkan validation not applicable (no AGC/shader/VideoOut change)
Negative control 2 output
0% tests passed, 1 tests failed out of 1
The following tests FAILED:
	2864 - nkwebkit_noops (Subprocess aborted)

Negative control

  1. I restored Export.cpp, include/Api.hpp, include/InventoryExports.hpp and libSceNKWebKit.hpp from main and moved the two new production files aside. nkwebkit_noops_tests then fails to build: fatal error: prx/libSceNKWebKit/include/NoOpExports.hpp: No such file or directory.
  2. For a behavioural check, I kept the merged tree and made each of the 180 bodies in src/NoOpExports.cpp call NotImplemented_nid_no_patch(__func__), which is what main does for these exports. The test aborts. So the test does detect the change.

Afterwards I restored the merged files, rebuilt, and the test passed again with a clean git status.

Findings

Blocking

  1. 26 exports with non-void return types are declared and implemented as void. See core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp:11-12 and core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp:44-67, plus the matching bodies in src/NoOpExports.cpp. In WebKit's public C API (WKRenderLayer.h, WKRenderObject.h, and WKBundlePagePrivate.h for the two WKBundlePage ones), these functions return a value:

    • WKBundlePageCopyRenderTree returns WKRenderObjectRef.
    • WKBundlePageCopyRenderLayerTree returns WKRenderLayerRef.
    • WKRenderLayerGetRenderer and WKRenderLayerGetFrameContentsLayer return object refs.
    • WKRenderLayerCopyRendererName, CopyElementTagName, CopyElementID and the WKRenderObjectCopy* functions return WKStringRef.
    • GetElementClassNames, the three Get*ZOrderList/GetNormalFlowList functions and WKRenderObjectGetChildren return WKArrayRef.
    • WKRenderLayerIsClipping, IsClipped and IsReflection return bool.
    • WKRenderLayerGetCompositingLayerType returns an enum.
    • WKRenderLayerGetBackingStoreMemoryEstimate returns double.
    • WKRenderLayerGetAbsoluteBounds and WKRenderObjectGetFrameRect return WKRect.
    • WKRenderObjectGetAbsolutePosition returns WKPoint.
    • WKRenderObjectGetTextLength returns unsigned.

    The names alone say as much: under WebKit's Create/Copy rule, Copy* returns a new object, and an Is* predicate cannot be void.

    This contradicts the classification stated in the PR and in the new debt entry (docs/dev/debt/libSceNKWebKit.md:17): "65 the current WebKit C API headers declare void". By the PR's own reasoning ("ret writes no return register … returning zero would be this library's choice"), these exports have a known non-void contract and an unmeasured return value. With an empty void body, a guest caller reads whatever happens to be in RAX/XMM0, and in the WKRect case relies on a returned sret pointer that is never set. The caller gets a garbage pointer or flag instead of a clear NotImplemented stop. That breaks the rule "every function either does exactly what it is supposed to or throws".

    Suggested fix: move these 26 back to throwing stubs (to Export.cpp/Api.hpp and the inventory table, as on main). Update the counts in the debt entry and the description (39 C API void + 115 ctor/dtor = 154 empty functions; 203 throwing). Then re-check the remaining 39 C API names against the headers.

Non-blocking

  1. The description overstates what the test checks. It says nkwebkit_noops "checks that the 177 unresolved exports still throw". tests/NoOps.cpp:19-201 only calls the 180 empty functions and checks that the not-implemented counter is unchanged (line 20 and line 201). None of the 177 is called. Either correct the description or drop the claim.
  2. Wording of the export counts. The commit message and the comment on 2026-11-01 say the batch "removes 357 throwing rows from Export.cpp". The diff removes 180 definitions (540 lines = 180 × 3); the other 177 were never touched. The description's split is right, but the "357 … removed" phrasing is not.
  3. Double blank lines in Export.cpp. Each removed stub leaves a double blank line: 182 such runs after the merge, against 2 on main. git diff --check and the conventions check accept this, but removing the separator line with each stub would keep the file uniform.

Not verified

  • I could not open the WebKit headers in the sandbox (no network, no WebKit source in the tree). The return types above come from WebKit's public C API, as stated, and are backed by the Copy/Is naming. The author should confirm them against the exact headers they used.
  • The bare-ret bodies, NIDs and the module SHA-256 come from the author's gist and the 11.00 image, which I do not have. I did not re-measure them.
  • No title imports libSceNKWebKit according to the author, so I saw no runtime behaviour in a game, and none was launched.

To get this to a good state

  • Put the 26 non-void C API exports listed above back to NotImplemented_nid_no_patch stubs and restore their inventory rows.
  • Correct the counts in docs/dev/debt/libSceNKWebKit.md, the commit message and the PR description.
  • Either add a check that a sample of the still-unimplemented exports throws, or remove that claim from the description.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5749752536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13930#pullrequestreview-5749752536). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T09:29:15Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The PR merges and builds cleanly, the new `nkwebkit_noops` test passes, and it fails when the 180 bodies throw as they did on `main`. However, 26 of the 65 C API exports the PR declares `void` (it says "the current WebKit C API headers declare `void`") actually return a value, so they belong in the group that keeps throwing. ## What I ran Head `16bbbb24faad0a1a019aa5c7b1d8de5dff43af9d`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `00c2720cd6f55fc562ad477280bde0fbe54cc682`. ``` git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...16bbbb24faad0a1a019aa5c7b1d8de5dff43af9d python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32 # negative control 1: main production files, new NoOpExports.{hpp,cpp} moved aside ninja -C build -j32 -l32 nkwebkit_noops_tests # negative control 2: merged tree, every body in src/NoOpExports.cpp calls NotImplemented_nid_no_patch(__func__) ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$' # restore merged tree ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$' git status --porcelain ctest --test-dir build --output-on-failure -R public_headers ``` (The build tree had to be regenerated for the negative control because the controls change the file set that the source globs pick up. The sandbox stopped CMake from rewriting configure outputs owned by another user, so I replaced those generated files with copies that keep their timestamps, then reran `cmake`. No source file was involved.) ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Script build (Release, GCC 14.2.0) | ok | | Script tests (832 run) | no new failures, no timeouts. 1 known failure on `main` (`unwrap_self_..._destination_directory_group`), unrelated | | `ctest -R nkwebkit` | 12/12 passed (`nkwebkit_noops` 0.01 s) | | `ctest -R public_headers` | 65/65 passed (172 s in total across the 65 tests, run one after another) | | Negative control 1 | test fails to compile (header missing) | | Negative control 2 (bodies throw) | `nkwebkit_noops` fails (Subprocess aborted) | | After restore | `nkwebkit_noops` passes, `git status --porcelain` empty | | Vulkan validation | not applicable (no AGC/shader/VideoOut change) | <details><summary>Negative control 2 output</summary> ``` 0% tests passed, 1 tests failed out of 1 The following tests FAILED: 2864 - nkwebkit_noops (Subprocess aborted) ``` </details> ## Negative control 1. I restored `Export.cpp`, `include/Api.hpp`, `include/InventoryExports.hpp` and `libSceNKWebKit.hpp` from `main` and moved the two new production files aside. `nkwebkit_noops_tests` then fails to build: `fatal error: prx/libSceNKWebKit/include/NoOpExports.hpp: No such file or directory`. 2. For a behavioural check, I kept the merged tree and made each of the 180 bodies in `src/NoOpExports.cpp` call `NotImplemented_nid_no_patch(__func__)`, which is what `main` does for these exports. The test aborts. So the test does detect the change. Afterwards I restored the merged files, rebuilt, and the test passed again with a clean `git status`. ## Findings ### Blocking 1. **26 exports with non-`void` return types are declared and implemented as `void`.** See `core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp:11-12` and `core/libs/prx/libSceNKWebKit/include/NoOpExports.hpp:44-67`, plus the matching bodies in `src/NoOpExports.cpp`. In WebKit's public C API (`WKRenderLayer.h`, `WKRenderObject.h`, and `WKBundlePagePrivate.h` for the two `WKBundlePage` ones), these functions return a value: - `WKBundlePageCopyRenderTree` returns `WKRenderObjectRef`. - `WKBundlePageCopyRenderLayerTree` returns `WKRenderLayerRef`. - `WKRenderLayerGetRenderer` and `WKRenderLayerGetFrameContentsLayer` return object refs. - `WKRenderLayerCopyRendererName`, `CopyElementTagName`, `CopyElementID` and the `WKRenderObjectCopy*` functions return `WKStringRef`. - `GetElementClassNames`, the three `Get*ZOrderList`/`GetNormalFlowList` functions and `WKRenderObjectGetChildren` return `WKArrayRef`. - `WKRenderLayerIsClipping`, `IsClipped` and `IsReflection` return `bool`. - `WKRenderLayerGetCompositingLayerType` returns an enum. - `WKRenderLayerGetBackingStoreMemoryEstimate` returns `double`. - `WKRenderLayerGetAbsoluteBounds` and `WKRenderObjectGetFrameRect` return `WKRect`. - `WKRenderObjectGetAbsolutePosition` returns `WKPoint`. - `WKRenderObjectGetTextLength` returns `unsigned`. The names alone say as much: under WebKit's Create/Copy rule, `Copy*` returns a new object, and an `Is*` predicate cannot be `void`. This contradicts the classification stated in the PR and in the new debt entry (`docs/dev/debt/libSceNKWebKit.md:17`): "65 the current WebKit C API headers declare `void`". By the PR's own reasoning ("`ret` writes no return register … returning zero would be this library's choice"), these exports have a known non-`void` contract and an unmeasured return value. With an empty `void` body, a guest caller reads whatever happens to be in RAX/XMM0, and in the `WKRect` case relies on a returned sret pointer that is never set. The caller gets a garbage pointer or flag instead of a clear `NotImplemented` stop. That breaks the rule "every function either does exactly what it is supposed to or throws". **Suggested fix:** move these 26 back to throwing stubs (to `Export.cpp`/`Api.hpp` and the inventory table, as on `main`). Update the counts in the debt entry and the description (39 C API `void` + 115 ctor/dtor = 154 empty functions; 203 throwing). Then re-check the remaining 39 C API names against the headers. ### Non-blocking 1. **The description overstates what the test checks.** It says `nkwebkit_noops` "checks that the 177 unresolved exports still throw". `tests/NoOps.cpp:19-201` only calls the 180 empty functions and checks that the not-implemented counter is unchanged (line 20 and line 201). None of the 177 is called. Either correct the description or drop the claim. 2. **Wording of the export counts.** The commit message and the comment on 2026-11-01 say the batch "removes 357 throwing rows from `Export.cpp`". The diff removes 180 definitions (540 lines = 180 × 3); the other 177 were never touched. The description's split is right, but the "357 … removed" phrasing is not. 3. **Double blank lines in `Export.cpp`.** Each removed stub leaves a double blank line: 182 such runs after the merge, against 2 on `main`. `git diff --check` and the conventions check accept this, but removing the separator line with each stub would keep the file uniform. ## Not verified - I could not open the WebKit headers in the sandbox (no network, no WebKit source in the tree). The return types above come from WebKit's public C API, as stated, and are backed by the Copy/Is naming. The author should confirm them against the exact headers they used. - The bare-`ret` bodies, NIDs and the module SHA-256 come from the author's gist and the 11.00 image, which I do not have. I did not re-measure them. - No title imports `libSceNKWebKit` according to the author, so I saw no runtime behaviour in a game, and none was launched. ## To get this to a good state - Put the 26 non-`void` C API exports listed above back to `NotImplemented_nid_no_patch` stubs and restore their inventory rows. - Correct the counts in `docs/dev/debt/libSceNKWebKit.md`, the commit message and the PR description. - Either add a check that a sample of the still-unimplemented exports throws, or remove that claim from the description. <!-- anyps5-bots job=2720 head=16bbbb24faad0a1a019aa5c7b1d8de5dff43af9d -->
XairRrR commented 2026-11-03 11:04:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T11:04:24Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

Commit fb551aab85 moves the 26 value-returning WebKit C API exports back to NotImplemented_nid_no_patch stubs, which resolves the previous blocking finding. But docs/dev/debt/libSceNKWebKit.md still has none of their 26 inventory rows and still gives the throwing count as 7258.

What changed since my last review

  • New commit fb551aab85 "fix(libSceNKWebKit): keep value-returning C API exports throwing". The first commit 16bbbb24fa is unchanged.
    • The 26 exports are removed from include/NoOpExports.hpp, src/NoOpExports.cpp and tests/NoOps.cpp.
    • They are back as int APS5_VABI X() { NotImplemented_nid_no_patch(__func__); } at the end of Export.cpp, with their declarations appended to include/InventoryExports.hpp. This is the same form as on main.
    • In the debt entry, the counts change to 154 empty (113 destructors, 2 constructors, 39 C API) and 203 throwing (152 C++, 51 C API).
  • The PR description now says that nkwebkit_noops only checks the 154 void exports. It also states "drops the 153 inventory rows … (7,437 → 7,284)".
  • Author comment on 2026-11-03 reports ctest -R nkwebkit 12/12, public_headers 65/65 and a passing conventions check.

What I ran

Head fb551aab854c873a566006cfb3eee856b0009c53, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 25bc84630b1694cb72ab4e9dcb2233acb2163918.

git show fb551aab854c873a566006cfb3eee856b0009c53
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...fb551aab854c873a566006cfb3eee856b0009c53
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32
# negative control: every body in src/NoOpExports.cpp made to call NotImplemented_nid_no_patch(__func__)
ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit
ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$'
# restore merged src/NoOpExports.cpp
ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit
ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$'
git status --porcelain
ctest --test-dir build --output-on-failure -R public_headers -j8 --test-load 32
# inventory rows: grep each of the 26 restored names in docs/dev/debt/libSceNKWebKit.md, merged tree and main
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Script build and tests (832 run) no new failures, no timeouts; 1 known failure on main (unwrap_self_..._destination_directory_group), unrelated
ctest -R nkwebkit 12/12 passed (nkwebkit_noops 0.01 s)
ctest -R public_headers 65/65 passed (96.6 s total, parallel)
Negative control (154 bodies throw) nkwebkit_noops fails (Subprocess aborted)
After restore nkwebkit_noops passes; git status --porcelain empty
Vulkan validation not applicable (no AGC, shader or VideoOut change)

Previous findings

  • Blocking 1, 26 non-void C API exports declared void: Resolved. fb551aab85 removes exactly the 26 names from NoOpExports.hpp, NoOpExports.cpp and NoOps.cpp. It adds 26 throwing definitions to Export.cpp and 26 declarations to InventoryExports.hpp, in the same form as on main (e.g. WKRenderLayerIsClipping). I re-read the remaining 39 C API names (WKContext*Set*, WKIconDatabase*, WKCookieManager*, WKContextGetStatistics*, WKWebsiteDataStore* and similar). None has a Copy/Get-value/Is name that would imply a return value. The 39/154/203 counts in the debt entry match the code (154 empty definitions in src/NoOpExports.cpp).
  • Non-blocking 1, description overstated the test: Resolved. The description now says the test calls the 154 void exports and checks that they add no NotImplemented calls, which is what tests/NoOps.cpp does.
  • Non-blocking 2, export-count wording: Still open (minor). The first commit message (16bbbb24fa) still says "180 … 65 functions … The other 177 keep throwing", which is now wrong. Squash or reword it so the history matches the final 154/203 split.
  • Non-blocking 3, double blank lines in Export.cpp: Still open. There are still 182 runs of two consecutive blank lines in the merged Export.cpp.

New findings

Blocking

  1. The 26 restored throwing exports are still missing from the debt inventory, and its count is stale. docs/dev/debt/libSceNKWebKit.md:37 still says "7258 of the 8703 inventory declarations listed below throw". The PR still removes 179 rows from the inventory table, including all 26 names fb551aab85 put back as throwing stubs: none of the 26 has a row in the merged file. For example, WKRenderLayerIsClipping is at docs/dev/debt/libSceNKWebKit.md:725 on main and absent after the merge, and the same holds for WKBundlePageCopyRenderTree. The PR description claims the opposite: "drops the 153 inventory rows … (7,437 → 7,284)". The debt file is where the project records what throws (CONTRIBUTING: a PR that closes a gap "cuts it to what is still open"), so 26 throwing exports now go unlisted and the count is wrong. Fix: restore the 26 | name | NID | rows from main and change 7258 to 7284. That is 7437 − 153, since one of the 154 implemented exports had no inventory row.

Non-blocking

None.

Not verified

  • I could not open the WebKit C API headers in the sandbox (no network). The void contracts of the remaining 39 come from the author, backed only by my reading of their names.
  • I did not re-measure the bare-ret bodies, NIDs or the module SHA-256 (the author's gist and the 11.00 image). No title imports libSceNKWebKit, so I saw no runtime behaviour, and I launched no game.
  • The author's reported local runs (12/12 nkwebkit, 65/65 public_headers) are accepted as author-reported; I reproduced both here.

To get this to a good state

  • Restore the 26 inventory rows in docs/dev/debt/libSceNKWebKit.md and set the count on line 37 to 7284, matching the description.
  • Optionally, reword or squash the first commit message so it gives the 154/203 split, and drop the extra blank line left by each removed stub in Export.cpp.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5751044219 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13930#pullrequestreview-5751044219). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T11:04:24Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested Commit `fb551aab85` moves the 26 value-returning WebKit C API exports back to `NotImplemented_nid_no_patch` stubs, which resolves the previous blocking finding. But `docs/dev/debt/libSceNKWebKit.md` still has none of their 26 inventory rows and still gives the throwing count as 7258. ## What changed since my last review - New commit `fb551aab85` "fix(libSceNKWebKit): keep value-returning C API exports throwing". The first commit `16bbbb24fa` is unchanged. - The 26 exports are removed from `include/NoOpExports.hpp`, `src/NoOpExports.cpp` and `tests/NoOps.cpp`. - They are back as `int APS5_VABI X() { NotImplemented_nid_no_patch(__func__); }` at the end of `Export.cpp`, with their declarations appended to `include/InventoryExports.hpp`. This is the same form as on `main`. - In the debt entry, the counts change to 154 empty (113 destructors, 2 constructors, 39 C API) and 203 throwing (152 C++, 51 C API). - The PR description now says that `nkwebkit_noops` only checks the 154 `void` exports. It also states "drops the 153 inventory rows … (7,437 → 7,284)". - Author comment on 2026-11-03 reports `ctest -R nkwebkit` 12/12, `public_headers` 65/65 and a passing conventions check. ## What I ran Head `fb551aab854c873a566006cfb3eee856b0009c53`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `25bc84630b1694cb72ab4e9dcb2233acb2163918`. ``` git show fb551aab854c873a566006cfb3eee856b0009c53 git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...fb551aab854c873a566006cfb3eee856b0009c53 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32 # negative control: every body in src/NoOpExports.cpp made to call NotImplemented_nid_no_patch(__func__) ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$' # restore merged src/NoOpExports.cpp ninja -C build -j32 -l32 nkwebkit_noops_tests libSceNKWebKit ctest --test-dir build --output-on-failure -R '^nkwebkit_noops$' git status --porcelain ctest --test-dir build --output-on-failure -R public_headers -j8 --test-load 32 # inventory rows: grep each of the 26 restored names in docs/dev/debt/libSceNKWebKit.md, merged tree and main ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Script build and tests (832 run) | no new failures, no timeouts; 1 known failure on `main` (`unwrap_self_..._destination_directory_group`), unrelated | | `ctest -R nkwebkit` | 12/12 passed (`nkwebkit_noops` 0.01 s) | | `ctest -R public_headers` | 65/65 passed (96.6 s total, parallel) | | Negative control (154 bodies throw) | `nkwebkit_noops` fails (Subprocess aborted) | | After restore | `nkwebkit_noops` passes; `git status --porcelain` empty | | Vulkan validation | not applicable (no AGC, shader or VideoOut change) | ## Previous findings - **Blocking 1, 26 non-`void` C API exports declared `void`: Resolved.** `fb551aab85` removes exactly the 26 names from `NoOpExports.hpp`, `NoOpExports.cpp` and `NoOps.cpp`. It adds 26 throwing definitions to `Export.cpp` and 26 declarations to `InventoryExports.hpp`, in the same form as on `main` (e.g. `WKRenderLayerIsClipping`). I re-read the remaining 39 C API names (`WKContext*Set*`, `WKIconDatabase*`, `WKCookieManager*`, `WKContextGetStatistics*`, `WKWebsiteDataStore*` and similar). None has a Copy/Get-value/Is name that would imply a return value. The 39/154/203 counts in the debt entry match the code (154 empty definitions in `src/NoOpExports.cpp`). - **Non-blocking 1, description overstated the test: Resolved.** The description now says the test calls the 154 void exports and checks that they add no `NotImplemented` calls, which is what `tests/NoOps.cpp` does. - **Non-blocking 2, export-count wording: Still open (minor).** The first commit message (`16bbbb24fa`) still says "180 … 65 functions … The other 177 keep throwing", which is now wrong. Squash or reword it so the history matches the final 154/203 split. - **Non-blocking 3, double blank lines in `Export.cpp`: Still open.** There are still 182 runs of two consecutive blank lines in the merged `Export.cpp`. ## New findings ### Blocking 1. **The 26 restored throwing exports are still missing from the debt inventory, and its count is stale.** `docs/dev/debt/libSceNKWebKit.md:37` still says "7258 of the 8703 inventory declarations listed below throw". The PR still removes 179 rows from the inventory table, including all 26 names `fb551aab85` put back as throwing stubs: none of the 26 has a row in the merged file. For example, `WKRenderLayerIsClipping` is at `docs/dev/debt/libSceNKWebKit.md:725` on `main` and absent after the merge, and the same holds for `WKBundlePageCopyRenderTree`. The PR description claims the opposite: "drops the 153 inventory rows … (7,437 → 7,284)". The debt file is where the project records what throws (CONTRIBUTING: a PR that closes a gap "cuts it to what is still open"), so 26 throwing exports now go unlisted and the count is wrong. **Fix:** restore the 26 `| name | NID |` rows from `main` and change 7258 to 7284. That is 7437 − 153, since one of the 154 implemented exports had no inventory row. ### Non-blocking None. ## Not verified - I could not open the WebKit C API headers in the sandbox (no network). The `void` contracts of the remaining 39 come from the author, backed only by my reading of their names. - I did not re-measure the bare-`ret` bodies, NIDs or the module SHA-256 (the author's gist and the 11.00 image). No title imports `libSceNKWebKit`, so I saw no runtime behaviour, and I launched no game. - The author's reported local runs (12/12 nkwebkit, 65/65 public_headers) are accepted as author-reported; I reproduced both here. ## To get this to a good state - Restore the 26 inventory rows in `docs/dev/debt/libSceNKWebKit.md` and set the count on line 37 to 7284, matching the description. - Optionally, reword or squash the first commit message so it gives the 154/203 split, and drop the extra blank line left by each removed stub in `Export.cpp`. <!-- anyps5-bots job=3288 head=fb551aab854c873a566006cfb3eee856b0009c53 -->
XairRrR commented 2026-11-03 12:20:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T12:20:07Z.

Review: APPROVED


Re-checked — approved

Commit 8fed98c69f puts the 26 inventory rows for the value-returning C API exports back in the debt file and changes the throwing count to 7284. The inventory now matches the code, and that was the last blocking finding.

What changed since my last review

  • New commit 8fed98c69f "docs(libSceNKWebKit): keep the 26 throwing exports in the inventory". It changes only docs/dev/debt/libSceNKWebKit.md (+27 −1):
    • It restores 2 WKBundlePageCopyRender* rows and 24 WKRenderLayer*/WKRenderObject* rows.
    • It changes "7258 of the 8703" to "7284 of the 8703".
  • Commits 16bbbb24fa and fb551aab85 are unchanged (range-diff =).
  • An author comment on 2026-11-03 reports ctest -R nkwebkit 12/12 and a passing conventions check.

What I ran

Head 8fed98c69f669fdc9d60c559273faf78fbfa3308, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 85f5b9a961b03616c79c54dab995f533af621bf9.

git show --stat 8fed98c69f669fdc9d60c559273faf78fbfa3308
git show 8fed98c69f669fdc9d60c559273faf78fbfa3308
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...8fed98c69f669fdc9d60c559273faf78fbfa3308
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
# inventory: sorted "| `name` | `nid` |" rows of main vs merged, comm both ways;
# check that each removed name is defined in src/NoOpExports.cpp
ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Script build and tests (807 run) no new failures, no timeouts; 1 known failure on main (unwrap_self_..._destination_directory_group), unrelated
ctest -R nkwebkit 12/12 passed
Inventory rows, main → merged 7428 → 7275: 153 removed, 0 added or changed
Removed rows vs src/NoOpExports.cpp all 153 names are among its 154 empty definitions; no removed row belongs to a throwing export
Vulkan validation not applicable (no AGC, shader or VideoOut change)

The merged inventory has no row that differs from main, so the 26 restored rows have the same NIDs as on main.

Negative control

The new commit changes only documentation and does not touch tests/NoOps.cpp. My previous review ran the negative control on the same test and production code: with all 154 bodies made to throw, nkwebkit_noops failed. I did not repeat it.

Previous findings

  • Blocking 1, the 26 restored throwing exports were missing from the inventory and the count was stale: Resolved.
    • docs/dev/debt/libSceNKWebKit.md:37 now reads "7284 of the 8703".
    • WKBundlePageCopyRenderTree is back at line 204 and WKRenderLayerIsClipping at line 693.
    • The set comparison above shows that only rows of exports that are now empty definitions were removed.
  • Non-blocking, wording of the first commit message: Still open (minor). 16bbbb24fa still says "180 of them have a known void contract … The other 177 keep throwing", but the final split is 154/203. Rewording or squashing it at merge would fix the history.
  • Non-blocking, double blank lines in Export.cpp: Still open (minor). The merged core/libs/prx/libSceNKWebKit/Export.cpp still has 182 places with two blank lines in a row, left where stubs were removed.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • I did not re-measure the bare-ret bodies, the NIDs or the module SHA-256 against the 11.00 image. They come from the author's gist.
  • I could not check the void contracts of the 39 C API exports against the WebKit headers (no network). They are author-reported, and the names are consistent with them.
  • No title imports libSceNKWebKit, so I observed no runtime behaviour, and I launched no game.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5752042890 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13930#pullrequestreview-5752042890). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T12:20:07Z. **Review:** APPROVED --- # Re-checked — approved Commit `8fed98c69f` puts the 26 inventory rows for the value-returning C API exports back in the debt file and changes the throwing count to 7284. The inventory now matches the code, and that was the last blocking finding. ## What changed since my last review - New commit `8fed98c69f` "docs(libSceNKWebKit): keep the 26 throwing exports in the inventory". It changes only `docs/dev/debt/libSceNKWebKit.md` (+27 −1): - It restores 2 `WKBundlePageCopyRender*` rows and 24 `WKRenderLayer*`/`WKRenderObject*` rows. - It changes "7258 of the 8703" to "7284 of the 8703". - Commits `16bbbb24fa` and `fb551aab85` are unchanged (range-diff `=`). - An author comment on 2026-11-03 reports `ctest -R nkwebkit` 12/12 and a passing conventions check. ## What I ran Head `8fed98c69f669fdc9d60c559273faf78fbfa3308`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `85f5b9a961b03616c79c54dab995f533af621bf9`. ``` git show --stat 8fed98c69f669fdc9d60c559273faf78fbfa3308 git show 8fed98c69f669fdc9d60c559273faf78fbfa3308 git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...8fed98c69f669fdc9d60c559273faf78fbfa3308 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 # inventory: sorted "| `name` | `nid` |" rows of main vs merged, comm both ways; # check that each removed name is defined in src/NoOpExports.cpp ctest --test-dir build --output-on-failure -R nkwebkit -j8 --test-load 32 git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Script build and tests (807 run) | no new failures, no timeouts; 1 known failure on `main` (`unwrap_self_..._destination_directory_group`), unrelated | | `ctest -R nkwebkit` | 12/12 passed | | Inventory rows, main → merged | 7428 → 7275: 153 removed, 0 added or changed | | Removed rows vs `src/NoOpExports.cpp` | all 153 names are among its 154 empty definitions; no removed row belongs to a throwing export | | Vulkan validation | not applicable (no AGC, shader or VideoOut change) | The merged inventory has no row that differs from `main`, so the 26 restored rows have the same NIDs as on `main`. ## Negative control The new commit changes only documentation and does not touch `tests/NoOps.cpp`. My previous review ran the negative control on the same test and production code: with all 154 bodies made to throw, `nkwebkit_noops` failed. I did not repeat it. ## Previous findings - **Blocking 1, the 26 restored throwing exports were missing from the inventory and the count was stale: Resolved.** - `docs/dev/debt/libSceNKWebKit.md:37` now reads "7284 of the 8703". - `WKBundlePageCopyRenderTree` is back at line 204 and `WKRenderLayerIsClipping` at line 693. - The set comparison above shows that only rows of exports that are now empty definitions were removed. - **Non-blocking, wording of the first commit message: Still open (minor).** `16bbbb24fa` still says "180 of them have a known void contract … The other 177 keep throwing", but the final split is 154/203. Rewording or squashing it at merge would fix the history. - **Non-blocking, double blank lines in `Export.cpp`: Still open (minor).** The merged `core/libs/prx/libSceNKWebKit/Export.cpp` still has 182 places with two blank lines in a row, left where stubs were removed. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - I did not re-measure the bare-`ret` bodies, the NIDs or the module SHA-256 against the 11.00 image. They come from the author's gist. - I could not check the `void` contracts of the 39 C API exports against the WebKit headers (no network). They are author-reported, and the names are consistent with them. - No title imports `libSceNKWebKit`, so I observed no runtime behaviour, and I launched no game. <!-- anyps5-bots job=3326 head=8fed98c69f669fdc9d60c559273faf78fbfa3308 -->
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!13930
No description provided.