Repository navigation
feat(agc): push and set debug markers from a text span - #8924
Conversation
Progress report (5d251e6 → 21eb489)📈 System libraries: 49.02% (+0.04%, +4 implemented functions) ✅ 4 implemented
Changed libraries (implemented exports)
|
| Agc::Command::Require(buf != nullptr, function, "null command buffer"); | ||
| const char* text = str ? str : ""; | ||
| const std::size_t bytes = std::strlen(text) + 1; | ||
| const std::size_t length = std::strlen(text); |
There was a problem hiding this comment.
This refactor removes the previous Require(buf != nullptr) before strlen. If a caller supplies a null command buffer and an invalid non-null guest string pointer, the legacy marker APIs now read that pointer before reporting the null-buffer error; this can fault instead of taking the checked error path. Please retain the buffer check before measuring str.
|
I prepared follow-up commit |
|
Thanks, you're right: moving the check into |
MarcZX10
left a comment
There was a problem hiding this comment.
The author incorporated the null-buffer validation fix and added the regression case with an invalid text pointer and null command buffer. The reported agc_commands cases now pass with the check in place. The updated fix preserves validation order before strlen; approved.
|
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.
|
sceAgcAcbPushMarkerSpan, sceAgcAcbSetMarkerSpan, sceAgcDcbPushMarkerSpan and sceAgcDcbSetMarkerSpan take (buffer, text, length, color) and, on the console, build the same user-data marker packet as their NUL-terminated counterparts with the length given by the caller. They now share the existing marker packets: the text is cut at the given length and terminated, and the set variants push and pop as sceAgc*SetMarker does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
A null command buffer with an unreadable text pointer must take the checked error path in sceAgcAcbPushMarker; without the buffer check before measuring the text, the test faults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
806949b to
21eb489
Compare
|
Rebased onto current |
What
Four
libSceAgcexports wereNotImplementedstubs inUnimplemented.cpp. In the decrypted PS5libSceAgc.sprxthey take(buffer, text, length, color). Each one builds the same driver user-data marker as its NUL-terminated counterpart, but with the length supplied by the caller instead ofstrlen.sceAgcAcbPushMarker(0x1B50) andsceAgcAcbPushMarkerSpan(0x1A90) both callsceAgcDriverUserDataWritePushMarkerwith the same arguments; only where the length comes from differs.sceAgcAcbPushMarkerSpan(8Kly1JrJUlw, 0x1A90)lengthand terminatedsceAgcAcbSetMarkerSpan(pxx-GoOSdw4, 0x1900)sceAgcAcbSetMarkerdoessceAgcDcbPushMarkerSpan(N7M3+N-sBCw, 0x7930)sceAgcDcbSetMarkerSpan(BYcSvEsINWU, 0x77A0)Agc::Marker::Pushnow measures the string and calls a newAgc::Marker::PushSpan, so the packet format is defined in one place. A null text pointer is accepted only with a zero length. The colour is ignored, as in the existing marker calls.The bodies reuse this project's marker packets; nothing from the module is copied.
Tested
Linux (CachyOS, GCC, Release): full build.
ctest -R "guest_|kernel|ampr|agc": 1381/1381 pass on the second run, withagc_driver_stencil_ref_exportskipped as usual. The first run reported one failure that did not reproduce, and I could not tell which test it was.The new
testMarkerSpansinagc_commandschecks:"framebuffer", 5, gives"frame");"frame"whole;With
sceAgcAcbPushMarkerSpanignoring its length, the test fails.tools/check_conventions.pyis clean. No open PR implements these names or NIDs. Merge note: #1060 (sceAgcAcquireMemSetEngine) and my #8318 (sceAgcSetSemaphoreMemory) delete the stub blocks between these four inUnimplemented.cpp. No line is changed by both, but git reports the neighbouring deletions as a conflict. Whichever merges second needs those stub deletions combined, nothing else.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)kitt_support; itslibSceJobManageralso imports the two ACB ones, as does PPSA29340'sagc_commands🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK