fix(libSceNpUniversalDataSystem): copy guest pointers safely in context and event exports #21557
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21557"
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 Gruzzberry on 2026-11-16T11:44:01Z.
What
sceNpUniversalDataSystemCreateContext, CreateEvent, EventEstimateSize and EventToString wrote through guest pointers directly. They now go through GuestPtr, GuestWritable and CopyGuestString, and return SCE_NP_UNIVERSAL_DATA_SYSTEM_ERROR_INVALID_ARGUMENT for an unreadable name or an unwritable output. CreateContext no longer registers a context whose id could not be written back. The property array and object setters are not touched.
Tested
Not built or run (no host compiler in this environment).
tools/check_conventions.py --base upstream/mainpasses. The guest pointer audit no longer lists the changed outputs.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 MarcZX10 on 2026-11-25T09:41:02Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the author-reported convention check was not run by me, and the change could not be built or tested here.
What I ran
Reviewed head
77a27ef295c257fc1e41ab769535b15d582a0c6busing the prepared diff and pinned repository reader. No build or test commands were available.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The build, tests, and convention check were not run by me. The author reports that
tools/check_conventions.py --base upstream/mainpasses; I did not verify that report. I readContext.cpp,Event.cpp, andGuestPtr.hpp; no changed files were excluded from the review.To get this to a good state
Nothing is required. Optional: add coverage for unreadable event names and unwritable output pointers.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T15:43:51Z.
Review: COMMENTED
This head conflicts in the UDS context and event implementations. Main already uses a checked copy for the context ID and explicitly preserves errno. The branch also delays advancing
table.nextuntil the copy succeeds. That distinction can be kept as a small change around the existing checked write.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.