fix(libScePngParser): guard metadata scratch writes with GuestArena::HostWrite #27978
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27978"
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 NobleBrains on 2026-11-28T00:06:30Z.
What
Guard guest metadata scratch writes in
libScePngParserwithGuestArena::HostWriteso invalid or unmapped guest pointers fail cleanly instead of crashing the host.Tested
guest_png_parserandguest_png_metadata_writer(2/2 passed)Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch).mdfiles or images added to the repositorySummary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T00:11:28Z.
Review: COMMENTED
Actionable comments posted: 1
2243ae81-c48f-417c-b4b6-bd01c25e8e9eReviewing files that changed from the base of the PR and between
750a5234edand923b411917.core/libs/prx/libScePngParser/WriteMetadata.cppIncluded 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 Plyxen on 2026-11-28T05:39:06Z.
Review: APPROVED
Checked head
923b411917. All on Windows 11 with WinLibs GCC 15.2 (Release), applied tomain4c7578e0a4together with #27997, #27996, #27975, #27973, #27971, #27969, #27967, #27964, #27958, #27950, #27949, #27946, #27945, #27943, #27938, #27936.tools/check_conventions.py --headandtools/debt_fold.py --checkpassed and the full build succeeded.guest_png_parserandguest_png_metadata_writerpass. Unlike a check-only guard,scratchWritestays open for the rest of the function, so it covers the scratch writes inCopyChunks. In the full CPU suite (5,131 tests) the only failures are unrelated:windows_read_trap_unknownfails onmaintoo (fixed in #28028), andframe_capture_minimizeis a timeout under load that passes on its own.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T08:06:06Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the only changed file was read in full, and the inspected code supports the stated behavior.
What I ran
Reviewed head
8d4c79ccd58d47d132ebbaf232ad295f2c657f3aagainst the prepared diff. No commands or tests were run; the author reports two Linux tests passed.Files read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch,review/README.md,core/libs/prx/libScePngParser/WriteMetadata.cpp,core/libs/prx/libc/include/GuestArena.hpp,core/libs/prx/libc/src/GuestArena.cpp, andcore/libs/prx/libc/src/General.cpp. The changed file was fully read.review/files.jsonwas not available as a review document;review/README.mdlists one changed file, included in full. No changed files were excluded.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author-reported Linux tests were not run during this review. No build or runtime checks were performed.
To get this to a good state
Nothing is required.