Repository navigation
fix(json): implement allocator error notification - #2308
yeahboi233 wants to merge 1 commit into
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Following up on the overlap report:
Neither PR is a dependency, so The local arm64 Release, ASan/UBSan and x86-64 Rosetta JSON tests passed, as did the relinker CI matrix and conventions checks. Full Linux/Windows library builds were skipped by the automatic workflow. Could a collaborator run those full checks and review which notification implementation to retain? |
|
Independent Windows validation for PR #2308:
This independently confirms that the PR builds and its JSON tests pass on native Windows. It does not verify the PS5-specific calling convention or exact behavior on console hardware. No production code was modified during validation. |
|
Closing: no title calls |
…ication Harvested from upstream (closed unmerged); library completion 2885/3260 -> 2886/3260. (changelog conflict: kept both) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011krDVCnnMQPaEFEqCDnKmA
What
Calling the existing
sce::Json::MemAllocator::notifyErrorexport raises a not-implemented exception instead of reporting the allocation error. Implement its default notification by printing the error code and requested byte count to stdout, returning normally and leaving allocator/user-data storage untouched.Replace the parameterless, integer-returning placeholder with a void callback taking the implicit allocator pointer, error code, 64-bit requested size and user-data pointer. The argument types come from the existing PS5 mangled export; the void return and default printing behavior come from the related VitaSDK JSON API. TechnicalDebt records that the PS5 return contract and exact diagnostic wording remain unverified on hardware.
This implements one existing gray cell in the JSON library: 92/94 to 93/94 functions in the progress report. It does not change JSON allocation or dispatch custom allocator callbacks. #992 originally declared this throwing import. No title-compatibility or unresolved-import fix is claimed.
Tested
macOS 26.6.2, Apple Silicon, AppleClang 21, current main
d70b89989473ba1f6ae13e44e079e67f1f8a44b0:GuestJson.cpptest fail on the original production stub with its not-implemented exception.Export.cppplus the completeGuestJson.cpppasses in an arm64 Release build (-O2 -DNDEBUG), arm64 AddressSanitizer/UBSan build, and x86-64 Release build executed through the already installed Rosetta.size_t, null/non-null user data, diagnostic contents, normal return and unchanged opaque storage. Existing JSON checks still run.NotImplemented_nid_no_patchthat throws for the remaining unrelated RTTI stub. They exercise the production JSON source; they do not constitute the full runtime build or patched.prxloader validation.git diff --checkpass. The existingguest_jsonCTest registration runs the added checks in a full build.Full Linux/Windows builds and console/game execution have not been run locally. Native Windows stdout capture and the guest calling convention need their platform checks.
Checklist
main; open-PR overlap checked before submission, with the later concurrent feat(libSceJson2): implement InitParameterRtti and MemAllocator::notifyError #2309 overlap recorded belowNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Open-PR overlap
The overlap bot reports #2281 and #2309. Neither is a dependency of this implementation.
sceNetResolverAbortand removes that entry from the same one-line unknown-signature list inTechnicalDebt.mdfrom which this PR removesnotifyError. The source and tests are separate. When both changes are integrated, the documentation list must omit both entries and retain both functions' individual uncertainty notes.notifyErrorexport and test declaration. Its current implementation discards the error code, requested size and user data, and validates the allocator pointer without printing a notification; this PR implements the default stdout diagnostic described by the related VitaSDK API and tests its contents. The two alternatives cannot merge unchanged. This PR does not incorporate feat(libSceJson2): implement InitParameterRtti and MemAllocator::notifyError #2309's separately inferred RTTI constructor layout.Depends on: noneremains accurate. The shared export is a competing implementation requiring a maintainer choice or removal from one PR; declaring a dependency solely to suppress the bot would not reconcile the behavior.