feat(libSceJxr): implement PKFree as jxrlib does #9540
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9540"
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 alvaroelpob on 2026-10-22T00:53:37Z.
What
Implements
PKFreein libSceJxr. The module's four named exports (PKFree,PixelFormatLookup,readIS,writeIS) are all functions from Microsoft's jxrlib, soPKFreefollows jxrlib's JXRGlue.c:ERR PKFree(void** ppv): a non-nullppvhas*ppvreleased with the guestfreeand set to null; a nullppvdoes nothing.WMP_errSuccess(0).ERRislong, so the export returns a 64-bit value.PixelFormatLookup,readISandwriteISstill throw:PixelFormatLookupneeds jxrlib's pixel format table, andreadIS/writeISwork on the codec's internal bit I/O state. The debt entry now covers only those three, and a new Functional entry records thatPKFreefollows jxrlib and is not checked against the console's code.The module gets a
CMakeLists.txtso it can registerguest_jxr, which installs a recording application allocator, frees a guestmallocblock throughPKFree, and checks that the allocator'sfreereceived that block and the pointer is cleared. It then callsPKFreewith the cleared pointer and with a nullppv, and checks that both return 0 and free nothing.Tested
Ubuntu (WSL2), GCC 15.2.0, Release:
ctest --test-dir build -R guest_jxr --output-on-failurepasses. No title importsPKFreethat I know of, so it has not run under a title.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)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-22T00:53:44Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:02:15Z.
Review: APPROVED
I checked the upstream jxrlib PKFree implementation and ABI (
ERRislong), then reviewed the guest allocator test and debt scope. The code matches the pinned source behavior: it frees and nulls a non-null pointee, tolerates null inputs, and returns success. The hosted conventions and labels checks pass; no product build is currently configured for this PR, and the author reports the focused WSL2 test. I found no blocking issue in the reviewed diff.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:34:17Z.
I rechecked the current head against upstream
main: the merge is clean, but the sync check reports 1 commit ahead / 119 behind (basea6dcea927). The allocator behavior and test registration look consistent with the repo; your PR reports the focusedguest_jxrtest passing. Please refresh onto currentmainand rerun the focused test plus conventions before merge so the checklist reflects the current base.