fix(kernel): read a zero flexibleMemorySize in param.json as the default budget #5865
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5865"
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 billythemenace2 on 2026-10-14T14:06:00Z.
Requested by billy
What
Before: a title whose
param.jsondeclares"kernel": {"flexibleMemorySize": 0}stopped at start-up with "param.json kernel.flexibleMemorySize must be a positive multiple of 16 KiB". SONIC SUPERSTARS (PPSA06888) ships exactly that value, so since72211b70f(#4508) it no longer starts.After: a zero size leaves the default flexible memory budget, as an absent key or an absent
kernelobject already does. Sizes that are not a multiple of 16 KiB, negative numbers and non-integers are still rejected.How
parseParamJsonsetsflexibleMemorySizeBytesonly for a non-zero size. The parser test now checks that0gives no value instead of listing it as rejected.Tested
Windows 11, MinGW-w64 GCC, Release.
param_json_parserandparam_json_utf8pass. SONIC SUPERSTARS (PPSA06888) now gets past start-up and mounts its save data on this branch. It then stops on the 1D T# access that #5375 and #5456 address. Not tested: Linux, macOS.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
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-15T02:09:45Z.
I ran this PR's test on Linux.
Setup: this PR's diff applied to main at
8cd937e29(the PR's base is 490 commits behind it), default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), clean environment.ctest -R '^param_json_parser$', 3 runs each. The test did not open a GPU device, so this is a CPU-only run.main(_Unwind_Resume→_Unwind_RaiseException_Phase2→abort). Main's parser throws "must be a positive multiple of 16 KiB" for"flexibleMemorySize":0, which the new case passes in outside a try.So the new zero case fails without the fix here. I did not check Windows or macOS.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-15T06:48:06Z.
Update — 2026-10-18
Retested ANIMAL WELL (PPSA22520), v01.000.011, on unmodified main
9caecfd2d5a822be9daf84c69c7c33c7fafe52b9with rebuilt main libraries. Original metadata, includingkernel.flexibleMemorySize: 0, is unchanged. Startup, New Game and the opening room now work without a separate PR kernel, metadata override or local source patch. Late opening-scene trace intervals were approximately 60 presents/s; this is a short observation, not a full-game benchmark.The reporter additionally confirms audio, save reload and extended play work on this updated runtime. Two bounded automated runs ended at their requested duration limits with no detected fatal error. Later-area confirmation in the original report below refers to the earlier runtime.
System: Windows 11 Pro x64 build 26200, Ryzen 7 7800X3D, RTX 5070 Ti, NVIDIA 616.92, approximately 31 GiB usable RAM; Release, WinLibs GCC 15.2.0 r7.
Earlier PR-specific validation is retained below as history. AI-assisted testing/report: yes.
Confirmed for ANIMAL WELL (PPSA22520), content version 01.000.011, with the original game metadata unchanged.
Setup: Windows x64 (build 26200), Ryzen 7 7800X3D, NVIDIA RTX 5070 Ti, WinLibs GCC 15.2.0 r7, Release.
I cherry-picked this PR's change at
3c81a744bdf7f7898b64d0516c03cc1ac2697e1eonto maind92a8dad390af1807cc91622b924252141816a5a, rebuilt libkernel, and substituted only the patchedlibkernel.prxin a separate test runtime. The converted executable and every other deployed library were identical to the baseline. No metadata workaround or title-specific shim was used. Controller inputs usedAPS5_PAD_INPUT_FILE."kernel": {"flexibleMemorySize": 0}.param_json_parserandparam_json_utf8each passed three consecutive runs (ctest --repeat until-fail:3).This confirms the startup fix for Animal Well in discussion #966. The automated check covered 180 seconds of opening gameplay. Additional hands-on testing by the reporter confirms that audio, save reload, later areas, and long-term stability have also been checked and are working.
AI-assisted testing/report: yes.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:38Z.
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.
core/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/prx/libkernel/AppMetadata/src/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppcore/libs/tests/ParamJsonParser.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:51:08Z.
Checked that
flexibleMemorySize: 0now leaves the default budget while non-multiples of 16 KiB, negatives and non-integers are still rejected. Build and tests pass (173 tests,param_json_parserincluded), and the new zero case fails against main's parser. Matches the Linux run by @Dextroid17 and the Animal Well run by @THEMANnt; merging.Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-15T19:17:30Z.
Confirmed on PPSA22520 (ANIMAL WELL v01.000.011): stock
sce_sys/param.jsonhaskernel.flexibleMemorySize: 0, and currentmainaborts at start withparam.json kernel.flexibleMemorySize must be a positive multiple of 16 KiB. Removing thekernelobject (same as treating 0 as absent / default 448 MiB) lets the title create the Vulkan swapchain and run (textures, mouse, shader cache writes). Windows 10, RTX 3080.