feat(libSceNKWebKit): implement diagnostic logging keys, MediaTime, MIME registry, JSON values, WTF values and region geometry #13992

Merged
PrivacyOnion merged 9 commits from upstream-pr/13992 into main 2026-11-06 05:05:14 +00:00
PrivacyOnion commented 2026-10-31 14:35:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-10-31T14:35:49Z.


What

Replaces 297 libSceNKWebKit stubs with implementations that follow the WTF and WebCore sources of the PS5 11.x WebKit snapshot at neonmodder123/PS5-WebKit-11.x@80f77e9, evaluated for the PlayStation build. That repository is a personal mirror, not a Sony repository. The files it was read from match Sony's own archive: the PS5 open source page links WebKit-1100.zip (https://secure.cdn.us.playstation.com/oss/PS5/webkit/WebKit-1100.zip, 1,620,748,361 bytes, Last-Modified 10 Aug 2026), and the 18 upstream files these implementations follow (Region.cpp/.h, DiagnosticLoggingKeys.cpp, MediaTime.cpp/.h, PlatformTimeRanges.cpp, TimeRanges.cpp, MIMETypeRegistry.cpp, MIMETypeRegistryPlayStation.cpp, LegacySchemeRegistry.cpp, JSONValues.cpp/.h, PersistentEncoder.cpp, PersistentDecoder.cpp, URL.cpp, WTFString.cpp, StringView.cpp, StringImpl.cpp) have the same CRC-32 and size in that archive's central directory as in the mirror. Only the central directory was read, so no hash of the whole archive is claimed. Every implemented export was compared with its definition in the mirror; the ones that differed in some input, or that depended on something not present, were put back to stubs.

Area Exports
WebCore::DiagnosticLoggingKeys key strings and the memory and CPU usage bucketing helpers 70
WTF::MediaTime (48), WebCore::PlatformTimeRanges (30), WebCore::TimeRanges (13), WTF::abs(MediaTime) (1) 92
WebCore::MIMETypeRegistry (18) and WebCore::LegacySchemeRegistry (16) 34
WTF::JSONImpl values, objects and arrays 39
WTF::Persistence encoder, decoder and checksum (20), WTF::URL accessors and host classification (9), WTF::String (7), WTF::StringView split iterator (2), WTF::StringImpl (2) 40
WebCore::Region 22

Layouts are pinned with static_assert. WTF::MediaTime has a user-provided copy constructor and copy assignment, as upstream (MediaTime.h), so it is not trivially copyable and every export returning it by value uses the Itanium hidden result pointer; tests/MediaTime.cpp calls abs, toTimeScale and operator+ through function pointers with the guest shape (result pointer first). Other non-trivial class returns (WTF::String, Ref, Vector) also use the hidden result pointer, as in #13500. WTF::Vector is defined once in src/WtfVector.hpp.

src/Region.cpp and src/DiagnosticLoggingKeys.cpp are ports of WebCore/platform/graphics/Region.cpp and WebCore/page/DiagnosticLoggingKeys.cpp and keep Apple's BSD notice; the other new files are reimplementations.

Stays NotImplemented_nid_no_patch and recorded in docs/dev/debt/libSceNKWebKit.md: everything that formats numbers (MediaTime::toString, String::number*) or serialises JSON (writeJSON, including the Value and ArrayBase virtual slots), because upstream uses WTF's double-conversion and StringBuilder; MIMETypeRegistry::canShowMIMEType, extensionsForMIMEType and allowedFileExtensions, which depend on the media player or are ASSERT_NOT_IMPLEMENTED_YET() upstream; and the FilterOperation subclasses, whose objects are dispatched through the module's own vtables.

The operator new and delete of MediaTime and PlatformTimeRanges and the Persistence::Decoder destructors are left out because #13930, #13936 and #13947 implement them.

Tested

Windows 11, MinGW GCC 13.1 (host ABI, the library's src/*.cpp plus each test's own source linked into one executable). The six new suites (DiagnosticLoggingKeys, MediaTime, JsonImpl, MimeTypeRegistry, WtfValues, RegionGeometry) build together in the same tree and each exits 0; their expected values are derived from the upstream source, not from the implementation. Every source and test file of this PR also compiles with -fsyntax-only using the real APS5_VABI (sysv_abi) and the CI flags. python3 tools/check_conventions.py --base upstream/main and python3 core/libs/tests/test_public_headers.py --audit-only pass. The guest runtime needs WinLibs 15.2 or MSYS2, so the guest build and CTest run are left to CI. Not tested with a title or on Linux.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5098497957 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-10-31T14:35:49Z. --- ### What Replaces 297 `libSceNKWebKit` stubs with implementations that follow the WTF and WebCore sources of the PS5 11.x WebKit snapshot at [neonmodder123/PS5-WebKit-11.x@80f77e9](https://github.com/neonmodder123/PS5-WebKit-11.x/tree/80f77e94c63ee7202eec3d4b5b1a021dd89011ba), evaluated for the PlayStation build. That repository is a personal mirror, not a Sony repository. The files it was read from match Sony's own archive: the [PS5 open source page](https://www.playstation.com/en-us/oss/ps5/webkit/) links `WebKit-1100.zip` (https://secure.cdn.us.playstation.com/oss/PS5/webkit/WebKit-1100.zip, 1,620,748,361 bytes, Last-Modified 10 Aug 2026), and the 18 upstream files these implementations follow (`Region.cpp`/`.h`, `DiagnosticLoggingKeys.cpp`, `MediaTime.cpp`/`.h`, `PlatformTimeRanges.cpp`, `TimeRanges.cpp`, `MIMETypeRegistry.cpp`, `MIMETypeRegistryPlayStation.cpp`, `LegacySchemeRegistry.cpp`, `JSONValues.cpp`/`.h`, `PersistentEncoder.cpp`, `PersistentDecoder.cpp`, `URL.cpp`, `WTFString.cpp`, `StringView.cpp`, `StringImpl.cpp`) have the same CRC-32 and size in that archive's central directory as in the mirror. Only the central directory was read, so no hash of the whole archive is claimed. Every implemented export was compared with its definition in the mirror; the ones that differed in some input, or that depended on something not present, were put back to stubs. | Area | Exports | | - | - | | `WebCore::DiagnosticLoggingKeys` key strings and the memory and CPU usage bucketing helpers | 70 | | `WTF::MediaTime` (48), `WebCore::PlatformTimeRanges` (30), `WebCore::TimeRanges` (13), `WTF::abs(MediaTime)` (1) | 92 | | `WebCore::MIMETypeRegistry` (18) and `WebCore::LegacySchemeRegistry` (16) | 34 | | `WTF::JSONImpl` values, objects and arrays | 39 | | `WTF::Persistence` encoder, decoder and checksum (20), `WTF::URL` accessors and host classification (9), `WTF::String` (7), `WTF::StringView` split iterator (2), `WTF::StringImpl` (2) | 40 | | `WebCore::Region` | 22 | Layouts are pinned with `static_assert`. `WTF::MediaTime` has a user-provided copy constructor and copy assignment, as upstream (`MediaTime.h`), so it is not trivially copyable and every export returning it by value uses the Itanium hidden result pointer; `tests/MediaTime.cpp` calls `abs`, `toTimeScale` and `operator+` through function pointers with the guest shape (result pointer first). Other non-trivial class returns (`WTF::String`, `Ref`, `Vector`) also use the hidden result pointer, as in #13500. `WTF::Vector` is defined once in `src/WtfVector.hpp`. `src/Region.cpp` and `src/DiagnosticLoggingKeys.cpp` are ports of `WebCore/platform/graphics/Region.cpp` and `WebCore/page/DiagnosticLoggingKeys.cpp` and keep Apple's BSD notice; the other new files are reimplementations. Stays `NotImplemented_nid_no_patch` and recorded in `docs/dev/debt/libSceNKWebKit.md`: everything that formats numbers (`MediaTime::toString`, `String::number*`) or serialises JSON (`writeJSON`, including the `Value` and `ArrayBase` virtual slots), because upstream uses WTF's double-conversion and `StringBuilder`; `MIMETypeRegistry::canShowMIMEType`, `extensionsForMIMEType` and `allowedFileExtensions`, which depend on the media player or are `ASSERT_NOT_IMPLEMENTED_YET()` upstream; and the `FilterOperation` subclasses, whose objects are dispatched through the module's own vtables. The `operator new` and `delete` of `MediaTime` and `PlatformTimeRanges` and the `Persistence::Decoder` destructors are left out because #13930, #13936 and #13947 implement them. ### Tested Windows 11, MinGW GCC 13.1 (host ABI, the library's `src/*.cpp` plus each test's own source linked into one executable). The six new suites (`DiagnosticLoggingKeys`, `MediaTime`, `JsonImpl`, `MimeTypeRegistry`, `WtfValues`, `RegionGeometry`) build together in the same tree and each exits 0; their expected values are derived from the upstream source, not from the implementation. Every source and test file of this PR also compiles with `-fsyntax-only` using the real `APS5_VABI` (`sysv_abi`) and the CI flags. `python3 tools/check_conventions.py --base upstream/main` and `python3 core/libs/tests/test_public_headers.py --audit-only` pass. The guest runtime needs WinLibs 15.2 or MSYS2, so the guest build and CTest run are left to CI. Not tested with a title or on Linux. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 14:42:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T14:42:56Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The exact-head Windows CI build fails because two JSON vtable callbacks do not use the APS5_VABI calling convention required by their function-pointer types.

What I ran

Reviewed head ff86b3668f815894f0682ea509e75e8dfaa30106 against base 73f4f7e06e4f210a8c6570e335fd654dc0a86134; no local build or merge-preview was run. Environment: Debian Linux 6.1 x86_64, Python 3.11.2.

gh pr checks 13992 --repo boykopovar/AnyPS5
gh run view 41210877343 --repo boykopovar/AnyPS5 --log-failed
git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...ff86b3668f815894f0682ea509e75e8dfaa30106

I inspected the failing assignments in WtfJson.cpp and the callback declarations in WtfJsonTypes.hpp at this head.

Results

Check Result
Windows hosted build Failed compiling src/WtfJson.cpp at both vtable callback assignments.
Diff check Passed.
Conventions, eligibility, intake, labels, library portability, report Passed.
Linux and specialized product jobs Skipped by workflow.
Local build/tests Not run.
Unedited Windows compiler output
windows	Link changed host-only core/libs test executables	2026-10-31T14:39:18.2428503Z D:/a/AnyPS5/AnyPS5/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp:85:9: error: invalid conversion from 'void (*)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' to 'void (__attribute__((sysv_abi)) *)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' [-fpermissive]
windows	Link changed host-only core/libs test executables	2026-10-31T14:39:18.2436266Z D:/a/AnyPS5/AnyPS5/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp:99:9: error: invalid conversion from 'void (*)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' to 'void (__attribute__((sysv_abi)) *)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' [-fpermissive]
windows	Link changed host-only core/libs test executables	2026-10-31T14:39:26.1602919Z ninja: build stopped: subcommand failed.
Unedited diff-check output
diff_check_exit:0

Findings

Blocking

ValueVtable::writeJSON is declared with APS5_VABI in src/WtfJsonTypes.hpp, but ValueWriteJSON and ArrayWriteJSON are ordinary host-ABI functions assigned to it at WtfJson.cpp:85 and :99. MinGW rejects both conversions, so the library build cannot complete.

The minimal fix is to give both callbacks the required calling convention, or provide wrappers with that signature:

void APS5_VABI ValueWriteJSON(const Value*, StringBuilder&) {

Apply the same APS5_VABI annotation to ArrayWriteJSON.

Non-blocking

None identified from the reviewed evidence.

Sources

Not verified

I did not run the local Windows build, Linux build, the six standalone suites, a title, or console behavior. CI's Linux and specialized product jobs were skipped.

To get this to a good state

Add APS5_VABI to both callback definitions (or use wrappers with that signature), then rerun the Windows build and the standalone suites. I will recheck the new head and rerun the same available checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723345152 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5723345152). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T14:42:56Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The exact-head Windows CI build fails because two JSON vtable callbacks do not use the `APS5_VABI` calling convention required by their function-pointer types. ## What I ran Reviewed head `ff86b3668f815894f0682ea509e75e8dfaa30106` against base `73f4f7e06e4f210a8c6570e335fd654dc0a86134`; no local build or merge-preview was run. Environment: Debian Linux 6.1 x86_64, Python 3.11.2. ```sh gh pr checks 13992 --repo boykopovar/AnyPS5 gh run view 41210877343 --repo boykopovar/AnyPS5 --log-failed git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...ff86b3668f815894f0682ea509e75e8dfaa30106 ``` I inspected the failing assignments in `WtfJson.cpp` and the callback declarations in `WtfJsonTypes.hpp` at this head. ## Results | Check | Result | |---|---| | Windows hosted build | Failed compiling `src/WtfJson.cpp` at both vtable callback assignments. | | Diff check | Passed. | | Conventions, eligibility, intake, labels, library portability, report | Passed. | | Linux and specialized product jobs | Skipped by workflow. | | Local build/tests | Not run. | <details><summary>Unedited Windows compiler output</summary> ```text windows Link changed host-only core/libs test executables 2026-10-31T14:39:18.2428503Z D:/a/AnyPS5/AnyPS5/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp:85:9: error: invalid conversion from 'void (*)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' to 'void (__attribute__((sysv_abi)) *)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' [-fpermissive] windows Link changed host-only core/libs test executables 2026-10-31T14:39:18.2436266Z D:/a/AnyPS5/AnyPS5/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp:99:9: error: invalid conversion from 'void (*)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' to 'void (__attribute__((sysv_abi)) *)(const NKWebKit::JsonAbi::Value*, NKWebKit::JsonAbi::StringBuilder&)' [-fpermissive] windows Link changed host-only core/libs test executables 2026-10-31T14:39:26.1602919Z ninja: build stopped: subcommand failed. ``` </details> <details><summary>Unedited diff-check output</summary> ```text diff_check_exit:0 ``` </details> ## Findings ### Blocking `ValueVtable::writeJSON` is declared with `APS5_VABI` in `src/WtfJsonTypes.hpp`, but `ValueWriteJSON` and `ArrayWriteJSON` are ordinary host-ABI functions assigned to it at `WtfJson.cpp:85` and `:99`. MinGW rejects both conversions, so the library build cannot complete. The minimal fix is to give both callbacks the required calling convention, or provide wrappers with that signature: ```suggestion void APS5_VABI ValueWriteJSON(const Value*, StringBuilder&) { ``` Apply the same `APS5_VABI` annotation to `ArrayWriteJSON`. ### Non-blocking None identified from the reviewed evidence. ## Sources - [Vtable callback type and `APS5_VABI` requirement at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/ff86b3668f815894f0682ea509e75e8dfaa30106/core/libs/prx/libSceNKWebKit/src/WtfJsonTypes.hpp#L126-L132) - [Callback definitions and failing assignments at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/ff86b3668f815894f0682ea509e75e8dfaa30106/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp#L30-L100) ## Not verified I did not run the local Windows build, Linux build, the six standalone suites, a title, or console behavior. CI's Linux and specialized product jobs were skipped. ## To get this to a good state Add `APS5_VABI` to both callback definitions (or use wrappers with that signature), then rerun the Windows build and the standalone suites. I will recheck the new head and rerun the same available checks.
MarcZX10 commented 2026-10-31 14:46:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T14:46:51Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The new head fixes the Windows calling-convention errors, but leaves two live JSON vtable callbacks as silent no-ops.

What I ran

Rechecked head e77cd2cc2c3f736f83dd8368726d53f6b2a3e153 against base 73f4f7e06e4f210a8c6570e335fd654dc0a86134; no build or C++ tests were run locally. Environment: Debian Linux 6.1 x86_64, Python 3.11.2.

git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...e77cd2cc2c3f736f83dd8368726d53f6b2a3e153
python3 tools/check_conventions.py --base 73f4f7e06e4f210a8c6570e335fd654dc0a86134
gh pr checks 13992 --repo boykopovar/AnyPS5

I inspected the new head's callback definitions, vtable assignments, and exported writeJSON handlers. The no-build precheck's diff, convention/template, and dependency checks passed; its ABI and test-quality helpers were unavailable in the isolated checkout because those local helper files are not in the PR tree.

Results

Check Result
Diff check and conventions Passed.
Windows hosted build Pending at the last refresh; the prior head's calling-convention errors are fixed in this head.
Eligibility, labels, library portability, report Passed.
Linux and specialized product jobs Skipped by workflow.
Source inspection Both new vtable callbacks have empty bodies; both are installed in live Value vtables. The exported Value::writeJSON and ArrayBase::writeJSON handlers still throw as unimplemented.
Local build/tests Not run.
Unedited hosted check summary
windows	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567130240
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131824
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131712
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131490
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131730
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131492
conventions	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/41211436460/job/124567095710
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567099427
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/41211436411/job/124567095381
library-portability	pass	1m30s	https://github.com/boykopovar/AnyPS5/actions/runs/41211438120/job/124567099370
report	pass	55s	https://github.com/boykopovar/AnyPS5/actions/runs/41211438166/job/124567099529

Findings

Blocking

ValueWriteJSON and ArrayWriteJSON are installed into the writeJSON entries of the Value and Array vtables, but their bodies return without appending anything to the supplied StringBuilder. A guest calling these virtual methods therefore gets a normal return with no JSON output, while the corresponding exported writeJSON handlers in Export.cpp correctly remain throwing stubs. Either implement these callbacks and test serialized output, or make the callbacks throw and keep the unsupported behavior explicit in the debt inventory.

For the unsupported case, the minimal safe callback behavior is:

void APS5_VABI ValueWriteJSON(const Value*, StringBuilder&) {
    NotImplemented_nid_no_patch(__func__);
}

Apply the same behavior to ArrayWriteJSON.

Non-blocking

The earlier Windows compile failure is addressed by adding APS5_VABI to both callback definitions.

Sources

Not verified

The updated Windows build was pending, and I did not run the standalone JSON suites, Linux build, title, or physical-console behavior.

To get this to a good state

Implement and test both JSON writers, or make both vtable callbacks throw and ensure the unsupported paths are recorded. I will recheck the new head and rerun the same available checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723359565 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5723359565). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T14:46:51Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The new head fixes the Windows calling-convention errors, but leaves two live JSON vtable callbacks as silent no-ops. ## What I ran Rechecked head `e77cd2cc2c3f736f83dd8368726d53f6b2a3e153` against base `73f4f7e06e4f210a8c6570e335fd654dc0a86134`; no build or C++ tests were run locally. Environment: Debian Linux 6.1 x86_64, Python 3.11.2. ```sh git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...e77cd2cc2c3f736f83dd8368726d53f6b2a3e153 python3 tools/check_conventions.py --base 73f4f7e06e4f210a8c6570e335fd654dc0a86134 gh pr checks 13992 --repo boykopovar/AnyPS5 ``` I inspected the new head's callback definitions, vtable assignments, and exported `writeJSON` handlers. The no-build precheck's diff, convention/template, and dependency checks passed; its ABI and test-quality helpers were unavailable in the isolated checkout because those local helper files are not in the PR tree. ## Results | Check | Result | |---|---| | Diff check and conventions | Passed. | | Windows hosted build | Pending at the last refresh; the prior head's calling-convention errors are fixed in this head. | | Eligibility, labels, library portability, report | Passed. | | Linux and specialized product jobs | Skipped by workflow. | | Source inspection | Both new vtable callbacks have empty bodies; both are installed in live `Value` vtables. The exported `Value::writeJSON` and `ArrayBase::writeJSON` handlers still throw as unimplemented. | | Local build/tests | Not run. | <details><summary>Unedited hosted check summary</summary> ```text windows pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567130240 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131824 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131712 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131490 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131730 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567131492 conventions pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/41211436460/job/124567095710 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/41211438090/job/124567099427 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/41211436411/job/124567095381 library-portability pass 1m30s https://github.com/boykopovar/AnyPS5/actions/runs/41211438120/job/124567099370 report pass 55s https://github.com/boykopovar/AnyPS5/actions/runs/41211438166/job/124567099529 ``` </details> ## Findings ### Blocking `ValueWriteJSON` and `ArrayWriteJSON` are installed into the `writeJSON` entries of the `Value` and `Array` vtables, but their bodies return without appending anything to the supplied `StringBuilder`. A guest calling these virtual methods therefore gets a normal return with no JSON output, while the corresponding exported `writeJSON` handlers in `Export.cpp` correctly remain throwing stubs. Either implement these callbacks and test serialized output, or make the callbacks throw and keep the unsupported behavior explicit in the debt inventory. For the unsupported case, the minimal safe callback behavior is: ```suggestion void APS5_VABI ValueWriteJSON(const Value*, StringBuilder&) { NotImplemented_nid_no_patch(__func__); } ``` Apply the same behavior to `ArrayWriteJSON`. ### Non-blocking The earlier Windows compile failure is addressed by adding `APS5_VABI` to both callback definitions. ## Sources - [Vtable slot types at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/e77cd2cc2c3f736f83dd8368726d53f6b2a3e153/core/libs/prx/libSceNKWebKit/src/WtfJsonTypes.hpp#L126-L132) - [Empty callbacks and their vtable assignments at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/e77cd2cc2c3f736f83dd8368726d53f6b2a3e153/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp#L36-L100) - [Exported `writeJSON` handlers still throw at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/e77cd2cc2c3f736f83dd8368726d53f6b2a3e153/core/libs/prx/libSceNKWebKit/Export.cpp#L36094-L36099) ## Not verified The updated Windows build was pending, and I did not run the standalone JSON suites, Linux build, title, or physical-console behavior. ## To get this to a good state Implement and test both JSON writers, or make both vtable callbacks throw and ensure the unsupported paths are recorded. I will recheck the new head and rerun the same available checks.
MarcZX10 commented 2026-10-31 15:01:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T15:01:58Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The new head makes the JSON vtable callbacks fail explicitly, but the MediaTime return ABI still does not match the guest class definition.

What I ran

Reviewed head 5b76cddbaf458b3dedceaf136d65136e9e1b866a against base 73f4f7e06e4f210a8c6570e335fd654dc0a86134; the current-base merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or run C++ tests.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13992
git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...5b76cddbaf458b3dedceaf136d65136e9e1b866a

I also inspected the changed JSON callbacks and MediaTime declaration/return definitions at the exact head.

Results

Check Result
Diff check Passed.
Conventions and PR template Passed.
Current-base merge preview Clean.
ABI/test-quality helper scripts Unavailable in the isolated checkout; these local helper files are not part of the PR tree.
Hosted CI Windows was in progress at the last refresh; Linux and specialized product jobs were skipped. Other policy checks passed.
Local build/CTest Not run.
Unedited precheck convention output
All conventions checks passed.

Findings

Blocking

  • MediaTypes.hpp declares WTF::MediaTime without a user-declared copy constructor, so this local 16-byte type is trivially copyable. The PR nevertheless implements the exported MediaTime copy-constructor symbol and exposes multiple functions returning MediaTime by value. Under the Itanium C++ ABI, a class with a non-trivial copy constructor is returned through a hidden result pointer; a locally trivial declaration instead returns the two-word value in registers. This makes the implementation's calling sequence incompatible with guest callers for those return-by-value exports. Add the guest-compatible copy constructor to the type declaration and assert the intended ABI property, or implement/test wrappers that use the guest's hidden-result-pointer convention. The current tests call through this PR's own type declaration, so they cannot prove compatibility with the guest call sequence.

Non-blocking

  • The JSON callback fix in this head now throws on unsupported serialization, matching the exported handlers and the debt note.

Sources

Not verified

I did not build the Windows target, run the six standalone suites, or confirm the calling sequence against a console. Windows CI was pending; Linux and specialized product jobs were skipped.

To get this to a good state

Make the MediaTime declaration and return-value ABI match the guest, then add a test that calls through the guest ABI shape and rerun the Windows build. I’ll recheck the new head and the same relevant commands.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723443039 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5723443039). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T15:01:58Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The new head makes the JSON vtable callbacks fail explicitly, but the `MediaTime` return ABI still does not match the guest class definition. ## What I ran Reviewed head `5b76cddbaf458b3dedceaf136d65136e9e1b866a` against base `73f4f7e06e4f210a8c6570e335fd654dc0a86134`; the current-base merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or run C++ tests. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13992 git diff --check 73f4f7e06e4f210a8c6570e335fd654dc0a86134...5b76cddbaf458b3dedceaf136d65136e9e1b866a ``` I also inspected the changed JSON callbacks and `MediaTime` declaration/return definitions at the exact head. ## Results | Check | Result | |---|---| | Diff check | Passed. | | Conventions and PR template | Passed. | | Current-base merge preview | Clean. | | ABI/test-quality helper scripts | Unavailable in the isolated checkout; these local helper files are not part of the PR tree. | | Hosted CI | Windows was in progress at the last refresh; Linux and specialized product jobs were skipped. Other policy checks passed. | | Local build/CTest | Not run. | <details><summary>Unedited precheck convention output</summary> ```text All conventions checks passed. ``` </details> ## Findings ### Blocking - `MediaTypes.hpp` declares `WTF::MediaTime` without a user-declared copy constructor, so this local 16-byte type is trivially copyable. The PR nevertheless implements the exported `MediaTime` copy-constructor symbol and exposes multiple functions returning `MediaTime` by value. Under the Itanium C++ ABI, a class with a non-trivial copy constructor is returned through a hidden result pointer; a locally trivial declaration instead returns the two-word value in registers. This makes the implementation's calling sequence incompatible with guest callers for those return-by-value exports. Add the guest-compatible copy constructor to the type declaration and assert the intended ABI property, or implement/test wrappers that use the guest's hidden-result-pointer convention. The current tests call through this PR's own type declaration, so they cannot prove compatibility with the guest call sequence. ### Non-blocking - The JSON callback fix in this head now throws on unsupported serialization, matching the exported handlers and the debt note. ## Sources - [`MediaTime` declaration and layout at this head](https://github.com/boykopovar/AnyPS5/blob/5b76cddbaf458b3dedceaf136d65136e9e1b866a/core/libs/prx/libSceNKWebKit/src/MediaTypes.hpp#L15-L55). - [Return-by-value implementations at this head](https://github.com/boykopovar/AnyPS5/blob/5b76cddbaf458b3dedceaf136d65136e9e1b866a/core/libs/prx/libSceNKWebKit/src/Media.cpp#L162-L196). - [Itanium C++ ABI 1.75, return values for non-trivial class types](https://refspecs.linuxfoundation.org/cxxabi-1.75.html#non-trivial). - [Updated JSON callback behavior at this head](https://github.com/boykopovar/AnyPS5/blob/5b76cddbaf458b3dedceaf136d65136e9e1b866a/core/libs/prx/libSceNKWebKit/src/WtfJson.cpp). ## Not verified I did not build the Windows target, run the six standalone suites, or confirm the calling sequence against a console. Windows CI was pending; Linux and specialized product jobs were skipped. ## To get this to a good state Make the `MediaTime` declaration and return-value ABI match the guest, then add a test that calls through the guest ABI shape and rerun the Windows build. I’ll recheck the new head and the same relevant commands.
THEMANnt commented 2026-10-31 19:33:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-31T19:33:00Z.

Review: CHANGES_REQUESTED


Reviewed 59b102a72bec8c225e6dd54b7b6c2517eabe1d6e. The earlier hidden-result-pointer, JSON callback and range-cleanup fixes are present, but multiplication still has an independent overflow defect.

[P1] Preserve the multiplicand when checked multiplication fails (src/Media.cpp:708). __builtin_mul_overflow(a.m_timeValue, rhs, &a.m_timeValue) writes the wrapped product even on failure. The following sign check and rescaling therefore use corrupted input. Reproduced through the exported guest-ABI function: MediaTime(INT64_MAX, 1, Valid) * 2 returns negative infinity, while MediaTime(INT64_MAX - 1, 2, Valid) * 2 returns -4/1 instead of 9223372036854775806/1. Calculate into a temporary and assign only after success, as the addition/subtraction fixes already do; add both saturation and finite-rescaling regressions.

[P2] Integrate the ported third-party sources through a pinned source dependency. The PR explicitly identifies src/Region.cpp and src/DiagnosticLoggingKeys.cpp as WebKit ports and retains Apple's notices, but adds them directly to the main source tree. CONTRIBUTING.md requires new third-party code to be a source-built submodule under 3rdparty/. Please place the adapted files behind that integration (retaining their notices and source mapping), or obtain a maintainer-approved policy exception. This concerns the repository's contribution rule, not a legal determination.

Validation: all six supplied suites pass with the real Windows guest System V ABI under MSYS2 GCC 16.2 Release. The independent multiplication test fails on submitted code; a diagnostic copy changing only the product temporary makes it and all six suites pass (7/7). An independent allocation counter covers 1,000 TimeRanges create/union/intersect/invert/destruction cycles: 11,000 allocations, zero live afterward. Hosted Windows ran the new suites and reported 2,529/2,529 selected tests passing, demonstrating that the submitted tests miss this multiplication boundary. Local WebKit tests link selected sources with minimal libc support, not the full JavaScriptCore/libc runtime. Whitespace passes; no title or console run is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5724567601 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5724567601). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-31T19:33:00Z. **Review:** CHANGES_REQUESTED --- Reviewed `59b102a72bec8c225e6dd54b7b6c2517eabe1d6e`. The earlier hidden-result-pointer, JSON callback and range-cleanup fixes are present, but multiplication still has an independent overflow defect. **[P1] Preserve the multiplicand when checked multiplication fails (`src/Media.cpp:708`).** `__builtin_mul_overflow(a.m_timeValue, rhs, &a.m_timeValue)` writes the wrapped product even on failure. The following sign check and rescaling therefore use corrupted input. Reproduced through the exported guest-ABI function: `MediaTime(INT64_MAX, 1, Valid) * 2` returns negative infinity, while `MediaTime(INT64_MAX - 1, 2, Valid) * 2` returns `-4/1` instead of `9223372036854775806/1`. Calculate into a temporary and assign only after success, as the addition/subtraction fixes already do; add both saturation and finite-rescaling regressions. **[P2] Integrate the ported third-party sources through a pinned source dependency.** The PR explicitly identifies `src/Region.cpp` and `src/DiagnosticLoggingKeys.cpp` as WebKit ports and retains Apple's notices, but adds them directly to the main source tree. CONTRIBUTING.md requires new third-party code to be a source-built submodule under `3rdparty/`. Please place the adapted files behind that integration (retaining their notices and source mapping), or obtain a maintainer-approved policy exception. This concerns the repository's contribution rule, not a legal determination. Validation: all six supplied suites pass with the real Windows guest System V ABI under MSYS2 GCC 16.2 Release. The independent multiplication test fails on submitted code; a diagnostic copy changing only the product temporary makes it and all six suites pass (7/7). An independent allocation counter covers 1,000 TimeRanges create/union/intersect/invert/destruction cycles: 11,000 allocations, zero live afterward. Hosted Windows ran the new suites and reported 2,529/2,529 selected tests passing, demonstrating that the submitted tests miss this multiplication boundary. Local WebKit tests link selected sources with minimal libc support, not the full JavaScriptCore/libc runtime. Whitespace passes; no title or console run is claimed.
THEMANnt commented 2026-10-31 20:49:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-31T20:49:34Z.

Review: APPROVED


Re-reviewed ef6ca18c9bf6c04daf915e237386e28ca9da39f5. My P1 multiplication finding is resolved: the product is calculated into a temporary and committed only on success, preserving the original sign and value during saturation/rescaling. The added positive/negative overflow and finite-rescaling cases cover the reported defect.

Validation: all six supplied WebKit suites plus the independent multiplication and ownership checks pass (8/8) on Windows/MSYS2 GCC 16.2 Release with the real guest System V ABI. Running the updated tests against the previous multiplication implementation fails both MediaTime and the independent reproducer. The ownership check still records 11,000 allocations and zero live allocations after 1,000 cycles. Current-head hosted Windows also executes all six new suites and reports 2,539/2,539 selected tests passing. Whitespace passes; the review worktree is clean. Local checks use the previously documented focused harness, not the full JavaScriptCore/libc runtime.

I withdraw P2 as a blocking finding. I verified the existing in-tree CharactersToNumber.cpp and DateParsing.cpp ports and their retained notices, including the cited notice commits. My categorical submodule request was too broad in light of that established practice; the integration choice for these adapted files can remain with the maintainers.

No new actionable issue found in this follow-up. This approval supersedes my previous changes-requested review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5724855691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5724855691). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-31T20:49:34Z. **Review:** APPROVED --- Re-reviewed `ef6ca18c9bf6c04daf915e237386e28ca9da39f5`. My P1 multiplication finding is resolved: the product is calculated into a temporary and committed only on success, preserving the original sign and value during saturation/rescaling. The added positive/negative overflow and finite-rescaling cases cover the reported defect. Validation: all six supplied WebKit suites plus the independent multiplication and ownership checks pass (8/8) on Windows/MSYS2 GCC 16.2 Release with the real guest System V ABI. Running the updated tests against the previous multiplication implementation fails both `MediaTime` and the independent reproducer. The ownership check still records 11,000 allocations and zero live allocations after 1,000 cycles. Current-head hosted Windows also executes all six new suites and reports 2,539/2,539 selected tests passing. Whitespace passes; the review worktree is clean. Local checks use the previously documented focused harness, not the full JavaScriptCore/libc runtime. I withdraw P2 as a blocking finding. I verified the existing in-tree `CharactersToNumber.cpp` and `DateParsing.cpp` ports and their retained notices, including the cited notice commits. My categorical submodule request was too broad in light of that established practice; the integration choice for these adapted files can remain with the maintainers. No new actionable issue found in this follow-up. This approval supersedes my previous changes-requested review.
MarcZX10 commented 2026-10-31 20:56:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T20:56:03Z.

Review: APPROVED


Re-checked — new head, looks good

The current head fixes the reported MediaTime overflow and return-ABI issues, and an independent reviewer reports the focused regressions passing.

What I ran

Reviewed head ef6ca18c9bf6c04daf915e237386e28ca9da39f5 against base 0836dfdf4fecb1e0326100c490476e15d3a74da5. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I ran the repository's no-build precheck and inspected the exact-head MediaTime declaration and overflow fix. I did not build or run C++ tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13992
git diff --check 0836dfdf4fecb1e0326100c490476e15d3a74da5...ef6ca18c9bf6c04daf915e237386e28ca9da39f5

Results

Check Result
Diff check Passed.
Conventions and PR template Passed.
Dependency/merge preview Passed.
Hosted Windows Passed on this head.
Hosted Linux and specialized product jobs Skipped.
Focused WebKit tests and negative controls Another reviewer reports six new suites plus two independent checks passed, and the prior multiplication implementation fails the relevant regression; I did not rerun them locally.
Local build/tests Not run.
Unedited local check output
All conventions checks passed.

Findings

Blocking

None found in this follow-up. The current MediaTime type declares a non-trivial copy constructor and asserts it is not trivially copyable; the new multiplication fix commits the result only after checked multiplication succeeds. These address my prior ABI and overflow findings.

Non-blocking

The Linux build and console behavior remain unverified on this head.

Not verified

I did not run a local build, CTest, Linux build, title, or physical-console test. The focused Windows results above are from another reviewer, not my environment.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5724875389 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5724875389). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T20:56:03Z. **Review:** APPROVED --- # Re-checked — new head, looks good The current head fixes the reported `MediaTime` overflow and return-ABI issues, and an independent reviewer reports the focused regressions passing. ## What I ran Reviewed head `ef6ca18c9bf6c04daf915e237386e28ca9da39f5` against base `0836dfdf4fecb1e0326100c490476e15d3a74da5`. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I ran the repository's no-build precheck and inspected the exact-head `MediaTime` declaration and overflow fix. I did not build or run C++ tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13992 git diff --check 0836dfdf4fecb1e0326100c490476e15d3a74da5...ef6ca18c9bf6c04daf915e237386e28ca9da39f5 ``` ## Results | Check | Result | |---|---| | Diff check | Passed. | | Conventions and PR template | Passed. | | Dependency/merge preview | Passed. | | Hosted Windows | Passed on this head. | | Hosted Linux and specialized product jobs | Skipped. | | Focused WebKit tests and negative controls | Another reviewer reports six new suites plus two independent checks passed, and the prior multiplication implementation fails the relevant regression; I did not rerun them locally. | | Local build/tests | Not run. | <details><summary>Unedited local check output</summary> ```text All conventions checks passed. ``` </details> ## Findings ### Blocking None found in this follow-up. The current `MediaTime` type declares a non-trivial copy constructor and asserts it is not trivially copyable; the new multiplication fix commits the result only after checked multiplication succeeds. These address my prior ABI and overflow findings. ### Non-blocking The Linux build and console behavior remain unverified on this head. ## Not verified I did not run a local build, CTest, Linux build, title, or physical-console test. The focused Windows results above are from another reviewer, not my environment.
THEMANnt commented 2026-11-01 15:08:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-11-01T15:08:02Z.

Review: APPROVED


Re-reviewed b1e775f3b1d0ded46b7b1f08528cfb9b143299c9. No new actionable issue found. The multiplication implementation and regression test are unchanged from the fix I previously approved; the latest follow-up adjusts the debt inventory count.

Rebuilt the focused Windows/MSYS2 GCC 16.2 Release harness with the real guest ABI: all six supplied suites plus the independent multiplication and allocation/ownership checks pass, 8/8. The main checkout was not modified. Current-head hosted checks were queued when inspected, so I am not claiming a new full-project CI pass. The local harness uses selected WebKit sources and minimal libc support; no console/title run was performed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5728750536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13992#pullrequestreview-5728750536). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-11-01T15:08:02Z. **Review:** APPROVED --- Re-reviewed `b1e775f3b1d0ded46b7b1f08528cfb9b143299c9`. No new actionable issue found. The multiplication implementation and regression test are unchanged from the fix I previously approved; the latest follow-up adjusts the debt inventory count. Rebuilt the focused Windows/MSYS2 GCC 16.2 Release harness with the real guest ABI: all six supplied suites plus the independent multiplication and allocation/ownership checks pass, 8/8. The main checkout was not modified. Current-head hosted checks were queued when inspected, so I am not claiming a new full-project CI pass. The local harness uses selected WebKit sources and minimal libc support; no console/title run was performed.
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!13992
No description provided.