Repository navigation
Conversation
|
Could someone help establish the PS5 Json2 allocator/initialization contract for the separate C2 follow-up in #8005? This is a contract question for that follow-up; the implementation in this PR covers allocation-failure ownership. On tested revision c9f680fb, a synthetic parse/serialize probe performs 21 tracked host C++ allocations and makes zero calls to the supplied allocator's allocate/free/notify callbacks. Both the normal and null-returning callback settings still give successful initialize/parse results. Since no callback runs, this confirms ignored configuration but does not validate the candidate callback ABI. I need to establish:
An API reference or results from a small PS5 test covering these cases would help me implement the general behavior and add a regression that fails before the fix and passes afterward. The synthetic probe uses no title assets. |
d28dc66 to
1f0a363
Compare
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
Json2 array parsing constructs each value before linking it into its owning list. If list-node allocation fails, destination cleanup cannot reclaim that value. On the current main, parsing
[1]with allocation budget 2 retains one allocation after cleanup.Construct each array entry directly in its owning list so existing partial-tree cleanup owns it before further allocation. Current main already handles the object-entry failure paths from the original patch; retain its ordered object insertion, duplicate-key replacement and incremental parser behavior.
Extend allocation-failure coverage for valid and malformed documents, nested containers, long keys, callback reads and missing-key insertion. Preserve upstream iterator-copy and swap regressions. Check destination values, entry identity, container sizes and mismatch handlers after failures. Related to #8005, finding C9; no title, OOM or performance improvement is claimed.
Tested
Rebased on
a6dcea9279b53b3a39c13695eac66f7c8b5b503c; tested head1f0a363b503d5e689bae3a5667060b281a70fe9c.Windows 11 Pro 10.0.26300, WinLibs MinGW-w64 GCC 15.2.0r7 UCRT, Release, full build configuration with
BUILD_TESTING=ON. CPU: AMD Ryzen 9 7900X; RAM: 32 GB; GPU: NVIDIA GeForce RTX 4070 Ti SUPER.The final allocation-failure regression fails with unchanged current-main production code at
parse array budget=2: operation leaked allocations. With the fix it covers 37 operations and 549 forced allocation failures with no tracked leaks. The parser checks use current-main error codes, callback error propagation and acceptance of trailing input.The production build (
libs,relinker, patched-library fixture and both Json2 fixtures) passes. All three registered runtime tests pass without skips (3/3, 0.66 s). Conventions, main-sync and whitespace checks pass. The overlap checker flags conflicting #7215 and this PR itself; manual review confirms #7215 changes numeric locale conversion and does not implement allocation ownership.The default all-target build, complete CTest suite and game/title runs were not performed on this rebased head.
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)