feat(libSceJsc): implement WTF StringImpl and String creation and editing #18430
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18430"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by SHOnnay on 2026-11-11T14:08:29Z.
What
Implements 35 libSceJsc WTF string creation and editing exports that threw.
StringImpl:create(const LChar*)create8BitIfPossible(const UChar*)createFromLiteralcreateWithoutCopyingreplace(UChar, StringImpl*),replace(StringImpl*, StringImpl*),replace(unsigned, unsigned, StringImpl*)simplifyWhiteSpace()String:ASCIILiteral,const UChar*andconst LChar*make16BitFrom8BitSource,make8BitFrom16BitSourceappendoverloads,insert,remove,truncate,substringstripWhiteSpace,simplifyWhiteSpace,stripLeadingAndTrailingCharacterssplit(const String&),splitAllowingEmptyEntries(const String&)toUIntStrictFree functions:
nullString,emptyString.Depends on #18420. This is stacked on it and uses its
src/WtfStringAbi.hpp. The diff includes #18420's commit until it merges.Source. Ported from pinned WebKit
c55364d53f97:StringImpl.{h,cpp},WTFString.{h,cpp}StringToIntegerConversion.h,StringHasher.h,ASCIILiteral.hEvery mangled name matches its declaration there.
Allocation. libSceJsc and libSceNKWebKit export disjoint symbol sets, so libSceJsc's strings are created only by libSceJsc. It allocates them with the same block format as libSceNKWebKit's
WtfString.cpp:{raw, size}header before a 16-aligned blockEmptyImpllibSceJsc frees its own strings when it drops a reference.
ABI.
WtfStringAbi.hppgains a non-trivial 8-byteString(returned through the hidden pointer, like WebKit's), a 16-byteStringVectorandASCIILiteral, with static asserts.Known gap. libSceJsc exports no
StringImpl::destroyorfastFree. Guest code that drops a last reference resolves those to libSceNKWebKit. That works only because both libraries use the same allocation header, and NKWebKit'sdestroystill throws today. This is recorded first in the newdocs/dev/debt/libSceJsc.mdentry, together with these differences from WebKit:WSsetsplitreturns a vector whose capacity equals its sizesplitseparator, base 0, null arguments, and lengths WebKit rejects withCRASH()Left throwing:
String::utf8,tryGetUtf8,utf8Impl):CString/Expectedlayouts are not modelleddefaultWritingDirectionTested
macOS 27 on Apple M1. The new registered test
tests/WtfStringCreate.cppis a full-build test and was not run: the full build does not run on macOS. A Linux or Windows run is needed.Harness. A temporary host harness, not committed, compiled the unchanged production sources with the test file. It passed:
leaks --atExit: 0 leaksMutation check. All 4 hand mutations failed the harness:
splitadvanceappendwidth ruletoUIntStrictoverflow comparisonSyntax.
clang++ -arch x86_64 -fsyntax-onlypasses onExport.cpp,LegacyExports.cpp, both source files and both test files.Overlap. No open PR implements these exports.
gh pr listsearches found only #18420, the base.pr_overlap.pymerged both PRs sharing files cleanly.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T15:31:07Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
f7d61fffe3:tools/check_conventions.pypassed;git diff --checkclean.jsc_wtf_string_create_tests,jsc_wtf_string_search_tests,libSceJscfailed to build.Generated withfooter from the description; the AI-assisted checkbox can stay.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T14:26:00Z.
Review: CHANGES_REQUESTED
Reviewed libSceJsc WTF string creation and editing — changes requested
Changes are required before merge: correct the
simplifyWhiteSpaceexpectation atcore/libs/prx/libSceJsc/tests/WtfStringCreate.cpp:191, which makes the registered create test abort, and re-run both WTF string tests on Linux or Windows.What I ran
f7d61fffe364982afc9ea6d141a8ccf304d812ef, basemain, PR #18430 (stacked on #18420).diff.patch(13 changed files). The full texts infiles/were not opened.simplifyWhiteSpacecases and the search and create expectations by hand against the code in the diff.Results
-fsyntax-onlyFindings
Blocking
core/libs/prx/libSceJsc/tests/WtfStringCreate.cpp:191expectsu"a b "forsimplifyWhiteSpace(u" a b "). The code drops the trailing space (core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:306), so the result isa b.Equals16compares the length, soCheckaborts and the registeredjsc_wtf_string_createtest fails. The 8-bit case at line 177 of the same file expects the trailing space trimmed. The description's claim that the harness passed cannot hold for this line, so the run needs repeating on this file.Non-blocking
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:539,:543and:548:createFromLiteral(const char*, unsigned)and bothcreateWithoutCopyingoverloads check nothing for a null pointer when the length is nonzero, so they build a string with null data. The debt entry says null arguments throw. A guest that passesnullptrwith length 3 gets a string whose first read crashes. No test covers these cases.core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:500:String::~StringandStringVector::~StringVectorare implicitlynoexcept.DerefreachesDestroy, which throws for the last reference of an atom, symbol or external-buffer string, and an exception escaping a destructor callsstd::terminate. I found no host path that reaches this today, so it is latent.Not verified
check_conventions.py,test_public_headers.pyand the author's Rosetta, arm64 and ASan runs are all author-reported.simplifyWhiteSpacetrace is by hand, against the code at head.EmptyImplhash: not checked against the pinned WebKit commit, and the reader has no WebKit source. The constant asserted inTestStatics(core/libs/prx/libSceJsc/tests/WtfStringCreate.cpp:468) was not computed.Export.cpp.destroy: the documented known gap, not verified.createFromLiteralshould return the static empty string, as WebKit does: not verified.Export.cppon NID resolution in the loader: not verified. I searched the JSC tests folder for tests that expect the old throwing stubs and found none; I did not search other folders.diff.patch. Excluded by rule: none.To get this to a good state
core/libs/prx/libSceJsc/tests/WtfStringCreate.cpp:191tou"a b", matching the 8-bit case at line 177.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T05:21:38Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: validate
basebefore converting it to unsigned intoUIntStrict.What I ran
Reviewed head
c96d7cd79ba94d155254e66a20056eef779a5773and basemainusing the prepared diff and pinned repository reader. No build or test command was run.Results
Findings
Blocking
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:897converts the signedbasedirectly tounsigned, and:898divides by that value. Negative bases therefore become large unsigned divisors and evade the intended invalid-base handling; for example, base-1can parse a digit and report success. Reject negative bases before the conversion (and define behavior for bases outside the supported range).Non-blocking
None.
Not verified
The full-build test was not run, as stated in the PR description. I did not independently verify the author-reported temporary harness, sanitizer, syntax, convention, or header-audit results. The changed source, ABI header, test, CMake configuration, and debt entry were read; other changed files in the manifest were not read. No files were excluded by the review-folder listing.
To get this to a good state
Reject negative bases before unsigned conversion and add a regression test for a negative base; rerun the registered test on a supported build environment.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T05:35:05Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c96d7cd79b:tools/check_conventions.pypassed;git diff --checkclean.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Generated withfooter from the description; the AI-assisted checkbox can stay.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T05:18:29Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
791ea3cde4:tools/check_conventions.pypassed;git diff --checkclean.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Generated withfooter from the description; the AI-assisted checkbox can stay.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T13:30:31Z.
Review: COMMENTED
Reviewed — no blocking findings
The change adds 35 libSceJsc WTF string exports; I found no verified blocking defect in the code inspected, but the review is incomplete and the registered test was not run.
What I ran
No commands or tests were run. I inspected the prepared artifacts for head
9adae7c6d658163695bd2795156a9aafa8a48493and read selected ranges throughrepo_read.py.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
Not verified
I read
description.md,commits.md,manifest.json, anddiff.patch, plus selected code ranges fromcore/libs/prx/libSceJsc/src/WtfStringCreate.cppandcore/libs/prx/libSceJsc/tests/WtfStringCreate.cpp. The manifest lists nine changed files, all included, but I did not read every full changed file;Export.cpp,Api.hpp,InventoryExports.hpp,WtfStringCreateExports.hpp,libSceJsc.hpp,WtfStringAbi.hpp,CMakeLists.txt, and the debt fragment were not independently read in full. The author-reported harness, sanitizer, syntax and convention checks were not run by me. Console behavior and the allocation compatibility claim were not independently verified.To get this to a good state
Nothing is required. Optional: run the registered test on a supported build platform and complete review of the remaining changed files.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:00:45Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
9adae7c6d6:tools/check_conventions.pypassed;git diff --checkclean.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T17:04:22Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
a6026fa028:tools/check_conventions.pypassed.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T17:13:01Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
The head is
a6026fa028. The diff reads as a consistent port of 35 WTF string exports with matching declarations, but nothing was built or run here, and the changed files were read only through the diff.What I ran
a6026fa028, base main.StringImpl::findexport that the new split and replace code calls, and read the head of the WTF string ABI header.Results
finddependency resolvesFindings
Blocking
None.
Non-blocking
None.
Not verified
files/were not opened, so the surrounding code of each hunk was not checked.IsSpaceOrNewline, WtfStringCreate.cpp around lines 713–716) against the pinned WebKitc55364d53f97. I did not check it against the source.std::invalid_argument,std::length_error,std::logic_error) thrown across theextern "C"exports. How the guest handles them is not confirmed.docs/dev/debt/changes/feat-jsc-wtf-string-create.md. I did not check them.To get this to a good state
Nothing is required. Optional:
jsc_wtf_string_create_testson Linux or Windows and attach the output.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T12:39:06Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
48a94350f8:tools/check_conventions.pypassed.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T13:34:33Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: reject negative bases before converting them to unsigned in
toUIntStrict.What I ran
Reviewed head
48a94350f839265769ca02a30661b02e1ead1987using the prepared diff and pinned repository reader. No commands or tests were run.Results
toUIntStrictbases can be acceptedFindings
Blocking
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:454:baseis cast tounsignedwithout rejecting negative values. With base-1, the divisor becomesUINT_MAX; input"0"passes digit validation (0 < -1is true) and returns success, although the added test expects negative bases to fail. Reject bases below 1 before the cast (and cover base-1with input"0").Non-blocking
None.
Sources
The finding is based on the changed
ToUIntStrictimplementation and its negative-base test atcore/libs/prx/libSceJsc/tests/WtfStringCreate.cpp:458-459.Not verified
No tests or builds were run. The author-reported harness, syntax check, conventions check, header audit and mutation checks were not independently verified. Read all changed files listed in the manifest:
core/libs/prx/libSceJsc/CMakeLists.txt,core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/include/WtfStringCreateExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cpp,core/libs/prx/libSceJsc/tests/WtfStringCreate.cpp, anddocs/dev/debt/changes/feat-jsc-wtf-string-create.md. No changed files were excluded by the manifest.To get this to a good state
Reject negative bases before converting
baseto unsigned and add a regression check for base-1with input"0"; rerun the registeredjsc_wtf_string_createtest on the updated head.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T06:38:01Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
814dfb6614:tools/check_conventions.pypassed.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T06:46:46Z.
Review: COMMENTED
Reviewed — comments
Nothing is required; the review found a behavioral difference in
toUIntStrictthat should be confirmed against the target WebKit implementation.What I ran
Reviewed head
814dfb6614596f1a5fa626d1d18d39b969ea688dusing the prepared diff and the pinned repository reader. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
toUIntStrictaccepts a leading+and trailing whitespace without checking the conversion base range. Confirm the intended WebKit behavior for bases below 2 or above 36, and add focused cases if these inputs are valid by contract. The implementation explicitly handles base 0 and negative bases, butIsCharacterAllowedInBasecaps alphabetic digits at 36 while numeric digits may still pass for larger bases.core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:880andcore/libs/prx/libSceJsc/src/WtfStringCreate.cpp:890.Not verified
The changed file set was not read in full, so this review is incomplete. I read the description, commits, manifest, diff, and targeted ranges of
WtfStringCreate.cpp; I did not inspect all changed source and test files.files.jsonwas not available through the reader, so excluded-file details were not verified. Build, registered tests, and console behavior were not verified. The PR description reports a temporary macOS harness and syntax checks; those were not run in this review.To get this to a good state
Nothing is required. Optional: confirm and test out-of-range base behavior in
toUIntStrict.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T08:43:25Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8f1f329bb5:tools/check_conventions.pypassed.jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T09:00:10Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make libSceJsc-owned string destruction safe across the NKWebKit boundary, or avoid returning such strings until that path is supported.
What I ran
Reviewed head
8f1f329bb5e3cd96c5fa684812e0841c1cf71166against the prepared diff and pinned source usingrepo_read.pysearch and cat operations. No build or tests were run; the description says the registered test was not run and reports separate temporary harness results.Results
Findings
Blocking
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:243allocates returned string implementations in libSceJsc, while:700-702creates no-copy strings with the default internal ownership flag. The new localDerefdestroys supported last references itself, but the documented gap says guest code dropping a last reference resolvesStringImpl::destroyandfastFreethrough libSceNKWebKit. At this head, NKWebKit’sStringImpl::destroyexport still throws (NotImplemented_nid_no_patch), so guest destruction of these strings fails. The allocator header match does not make this path work. Provide a working cross-library destruction path (including any buffer ownership cases), or do not expose allocations that rely on that unresolved destroy export.Non-blocking
None.
Sources
Not verified
The full build and registered test were not run. The author reports host harness, mutation, syntax, convention and public-header audit results; these were not reproduced. Physical-console behavior was not tested. The review bundle excludes only files filtered out by preparation rules; all ten changed files marked included in
manifest.jsonwere read.To get this to a good state
Implement a working last-reference destruction path for the strings this PR returns, then rerun the registered test on Linux or Windows and verify the cross-library destruction behavior.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:59:03Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review; the points below are optional.
What I ran
Reviewed head
83ee02d422bf15cc832673c7d64c044262dc1629. No commands or tests were run. Read the prepared description, commits, manifest, and diff, plus targeted source and test context viarepo_read.py.Results
Findings
Blocking
None.
Non-blocking
StringImpl::createWithoutCopyingstores caller-owned character storage, but its allocation leaves the buffer-ownership bits atOwnershipInternal. When the last reference is released,Destroyfrees theStringImpland does not release the backing buffer. For dynamically allocated input this leaks the buffer. Set the ownership flags and preserve the expected non-owning lifetime semantics for literal-backed buffers.core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:263.Not verified
The registered full-build test and console behavior were not run. The author reports a temporary macOS harness and syntax checks, but those are not independently verified here. The changed-file full-text entries were included in the review bundle; no changed files were excluded by the manifest. Targeted repository context read:
core/libs/prx/libSceNKWebKit/src/Bmalloc.cpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp, andcore/libs/prx/libSceJsc/src/WtfStringSearch.cpp.To get this to a good state
Nothing is required. The ownership behavior above is optional feedback.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T12:12:33Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
83ee02d422:tools/check_conventions.pypassed.jsc_wtf_base64_tests,jsc_wtf_string_create_testsbuilt cleanly.jsc_wtf_string_create,jsc_wtf_base64):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/include/WtfBase64Exports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfBase64.cpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-28T04:18:17Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
91ec19e365:tools/check_conventions.pypassed.jsc_wtf_base64_tests,jsc_wtf_string_create_tests,nkwebkit_wtfstringimpldestroy_testsbuilt cleanly.jsc_wtf_string_create,jsc_wtf_base64,nkwebkit_wtfstringimpldestroy):core/libs/prx/libSceJsc/Export.cpp,core/libs/prx/libSceJsc/include/Api.hpp,core/libs/prx/libSceJsc/include/InventoryExports.hpp,core/libs/prx/libSceJsc/include/WtfBase64Exports.hpp,core/libs/prx/libSceJsc/libSceJsc.hpp,core/libs/prx/libSceJsc/src/WtfBase64.cpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp,core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WtfExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfString.cpp,core/libs/prx/libSceNKWebKit/src/WtfStringAbi.hpp,core/libs/prx/libSceJsc/src/WtfStringCreate.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T04:20:35Z.
Review: COMMENTED
Actionable comments posted: 1
faf8cf1e-6523-4167-9821-a5854ebf0ec4Reviewing files that changed from the base of the PR and between
e1629f7e9aand91ec19e365.core/libs/prx/libSceJsc/CMakeLists.txtcore/libs/prx/libSceJsc/Export.cppcore/libs/prx/libSceJsc/include/Api.hppcore/libs/prx/libSceJsc/include/InventoryExports.hppcore/libs/prx/libSceJsc/include/WtfBase64Exports.hppcore/libs/prx/libSceJsc/include/WtfStringCreateExports.hppcore/libs/prx/libSceJsc/libSceJsc.hppcore/libs/prx/libSceJsc/src/WtfBase64.cppcore/libs/prx/libSceJsc/src/WtfStringAbi.hppcore/libs/prx/libSceJsc/src/WtfStringCreate.cppcore/libs/prx/libSceJsc/tests/WtfBase64.cppcore/libs/prx/libSceJsc/tests/WtfStringCreate.cppcore/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/include/WtfExports.hppcore/libs/prx/libSceNKWebKit/src/WtfString.cppcore/libs/prx/libSceNKWebKit/src/WtfStringAbi.hppcore/libs/prx/libSceNKWebKit/tests/WtfStringImplDestroy.cppdocs/dev/debt/changes/feat-jsc-wtf-string-create.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T08:35:28Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: reject null character pointers when a nonzero length is supplied to the no-copy string factories.
What I ran
Reviewed head
91ec19e36596c18b6728e669eba7d62ddc402ef4. I read the prepared description, commits, manifest, diff, and targeted source and test ranges throughrepo_read.py. No build or tests were run by me; the test and harness results in the description are author-reported.Results
Findings
Blocking
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp:547andcore/libs/prx/libSceJsc/src/WtfStringCreate.cpp:552: the length-takingcreateWithoutCopyingoverloads pass the character pointer toCreateWithoutCopyingwithout rejectingnullptrwhenlengthis nonzero. The literal overload atcore/libs/prx/libSceJsc/src/WtfStringCreate.cpp:543has the same issue. These create a nonemptyStringImplwith a null data pointer, so later reads can dereference null. Reject null pointers for nonzero lengths before constructing the implementation.Non-blocking
None.
Sources
Not verified
I read the description, commits, manifest, diff, and targeted ranges from
WtfStringCreate.cpp,WtfStringAbi.hpp,WtfStringCreate.cpptests, andlibSceNKWebKit/src/WtfString.cpp. I did not read every file marked reviewed in the manifest; in particular, the fulllibSceNKWebKit/Export.cppwas excluded from the review folder and I did not inspect it through the reader. I did not run builds, tests, or the reported mutation checks. Other changed-file behavior is not verified.To get this to a good state
Reject null pointers when the supplied length is nonzero in each affected factory, then rerun the registered string creation test on a supported build environment.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T16:02:33Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation and its targeted tests were inspected at head
215cd2bca1e4e789cc4821c30402404a0570418a; no blocking defect was verified, but the registered full-build test was not run and some changed files were not read.What I ran
No build or tests were run. The description reports a temporary host harness and syntax checks; those results were not independently run in this review.
Results
Findings
Blocking
None.
Non-blocking
jsc_wtf_string_createin the supported full-build environment and report its result; the description says this registered test has not yet run.Not verified
The changed
libSceNKWebKit/Export.cppwas excluded from the review folder as too large; only its initial lines and the relevant changed diff were inspected. The following included changed files were not read in full:libSceJsc/Export.cpp,include/Api.hpp,include/InventoryExports.hpp,include/WtfBase64Exports.hpp,include/WtfStringCreateExports.hpp,libSceJsc.hpp,src/WtfBase64.cpp,src/WtfStringAbi.hpp,src/WtfStringCreate.cpp,tests/WtfStringCreate.cpp,libSceNKWebKit/include/InventoryExports.hpp,libSceNKWebKit/include/WtfExports.hpp,libSceNKWebKit/src/WtfString.cpp,libSceNKWebKit/src/WtfStringAbi.hpp,libSceNKWebKit/tests/WtfStringImplDestroy.cpp, and the debt fragment. Targeted ranges of several of these files and relevant diff hunks were inspected. Console behavior and the author-reported harness, sanitizer, syntax, convention, and header-audit results were not independently verified.To get this to a good state
Nothing is required. Optional: run the registered full-build test and share the result.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T06:28:00Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
0953fab95350911d3069cdc738c83eeb7b9f6394. Read the prepared description, commit list, manifest, and changed code ranges throughrepo_read.py. No tests or builds were run; the description reports a host harness and syntax checks, which I did not run.Results
Findings
Blocking
None verified in the code read.
Non-blocking
Not verified
Read
core/libs/prx/libSceJsc/src/WtfStringCreate.cpp,core/libs/prx/libSceJsc/src/WtfStringAbi.hpp, and relevant ranges ofcore/libs/prx/libSceNKWebKit/src/WtfString.cpp. The manifest lists 20 changed files as reviewed, but I did not read all of them or inspect every hunk. No files were excluded by the supplied rule. The reported tests, syntax checks, and console behavior were not independently verified.To get this to a good state
Nothing is required. Optional: complete review of the remaining changed files and hunks before relying on this review for a merge decision.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T06:34:09Z.
Review: COMMENTED
Actionable comments
d4ab2327-e51f-4694-b888-77b316bef8e1Reviewing files that changed from the base of the PR and between
215cd2bca1and0953fab953.core/libs/prx/libSceJsc/tests/ContentSearchUtilities.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:31:21Z.
Review: COMMENTED
The trial merge onto
c1601e56d5was clean, and a separate trial composition with exact #18442 was clean. Please retain the cross-library lifetime cases for a borrowed string and a retained substring, since copy-only tests cannot verify that NKWebKit destruction respects both ownership forms. The debt records the unverified guest string layout. Please make the pinned upstream commit in each adapted source notice a clickable link to meet the repository’s attribution rule.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.