Repository navigation
Conversation
…a PS5 Measured on libSceLibcInternal.sprx of a PS5 on firmware 13.60: - snprintf_s and vsnprintf_s: RSIZE_MAX is 2^61 - 1. A null buffer, size 0 or a size above RSIZE_MAX returns -1 with the buffer untouched; a null format returns -1 with buffer[0] zeroed; %n or a null %s, %ls or %S argument returns -23, keeps the output written before it and zeroes buffer[0]. Every violation calls the constraint handler with the console's message, a null pointer and EINVAL. - sscanf_s and vsscanf_s: the size argument is 64 bits. A %s or %[ field of at least size characters stores its first size characters without a terminator and is a matching failure; %c stores at most size characters and succeeds. Null destinations and sizes above RSIZE_MAX call the handler and return the assignments, or -23 before any conversion. A literal mismatch at the end of input returns the assignments, and %n counts as a conversion for the EOF result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…les ship Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e stdio variadic test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JJenkx measured titles' own libc.prx: %ls and %l[ follow the narrow rules, while %lc with a width above the size stores size units and consumes the whole width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Integrated current New head: Linux Release: This is current-main Linux integration and Windows cross-compilation syntax evidence. Earlier actual Windows/title-library measurements retain their historical pins; no new Windows runtime, macOS, title, GPU or performance result is claimed. AI-assisted: yes. Evidence: immutable Linux qualification bundle. Its SHA-256 is |
…nput JJenkx's run of two reference libc modules returns 0 from fscanf_s for a literal mismatch at end of input, as sscanf_s does on the PS5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oneandonlydean Addressed at Rather than duplicating the adaptation, I integrated @orezraey's actual #9087 head Rebuilt libc and nine formatting/scan/stream/CRT/string/safe-error groups, each passing three times: 27 passes, zero skips. Public headers pass. Conventions exit0 with no errors and one inherited debt-length warning. A frozen guest_formatting executable fails specifically in CheckTerminatedFormat when only the Linux sprintf_s/vsprintf_s bodies are restored to the actual prerequisite, then passes after byte-identical source/library restoration. Logs, exact source composition and hashes are linked in the refreshed description. Current-head Windows remains pending; earlier module/Windows evidence keeps its old pins. AI-assisted: yes (Codex). |
|
Current-main refresh — 2026-11-02. Published head Rebuilt actual libc/Ampr and selected tests from the final input tree. Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON. Focused Linux CPU qualification only plus MinGW syntax. Older Windows/module/reference reports retain their original pins; no fresh Windows/macOS, SDK-module, console, title/GPU or speed claim. AI-assisted: yes (Codex). Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-six-main-a4eca-linux-extra10321-20261102.tar.gz; SHA-256 525ccb31a5d3d0f5adced5fda58818d8432f06c0afa7290139adb60ae6664b54. @oneandonlydean The earlier wide-bounds adaptation remains intact; this reply documents the later current-main conversion-guard conflict and its qualified resolution. Please re-review this final integration when available. |
|
Windows check of the rebased head Setup: Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7 (the CI toolchain), Release,
🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take main's set_constraint_handler_s and wcsncat_s entries and boykopovar#9863's short-field wording, keep this branch's sscanf_s constraint wording, and use SonyRsizeMax from SonyCrt.hpp instead of a local copy of the same limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Current-main integration — 2026-11-04. Head Linux x86-64, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON: rebuilt actual libc/Ampr and selected executables. Source/parent/gitlink proofs, library/test hashes, raw logs/JUnit and head-leased push receipts: qualification archive, SHA-256 |
Keep boykopovar#13119's ordinary %n bookkeeping beside the secure contiguous one, route sscanf through ScansInProcess, and give the shared secure stream %c loop the 32-bit width rule and the destination-size clamp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows check for the scheduled cross-platform review, at head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
✅ AMD GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (14, not counted against this PR)Validation IDs already present on main (4 IDs in 807 tests)Skipped (61)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Refreshed to Fresh Linux CPU-only qualification: 7/7 runtime tests pass, zero skips; actual module/fixture builds, production NID patching, conventions/whitespace and MinGW syntax pass. A frozen guest_stdio_variadic executable fails at the clamped-width assertion with only the prior child/main Formatting.cpp restored. Exact restoration passes and reproduces source, library and executable hashes. Public-header auditing remains red on main and this head for exactly the same five missing WKSecurityOrigin declarations; this is recorded, with no header-green claim. The inherited older-main Windows allocation compile failure is fixed by already merged #15855; the fixing source is preserved here. Its successful Windows build is upstream evidence, not this branch’s Windows qualification. Final merge preview against main Immutable source/log/JUnit/control evidence, SHA-256 AI-assisted: yes (Codex). |
❌ AMD GPU test: failedPR head
Failing testsThis PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.
agc_graphics_profile_draw: Timeout (also failed when re-run alone), assertion and diagnosticsUnstable on main (7, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (10, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validation IDs already present on main (4 IDs in 805 tests)Skipped (71)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
Current-main integration — 2026-11-05. Exact head
d6290aca7acbe0bbbfeda37ef2f7a2564842124bretains previous public6a3e6798b1e94118988bbb41fdab6c3830abe74band tested main6d173c1a19788ff69d43b3d0ca62833e312ef939as ancestors. The actual latest #9087 parent1c3b118df8c062114d7962b48dbc39cfa4105496is retained. The whole ScanSource matches that prerequisite composed with main, including signed 32-bit secure-stream%cwidth/clamping and the parent’s five regression rows; FormatTerminated remains byte-identical to the previous public head. The count-bookkeeping conflict resolves to the parent’s Boolean-equivalent expression. The child sprintf_s debt remains; the superseded narrow-width discrepancy is removed as in the parent.Linux x86-64, GCC16.2.1, Ninja Release: actual production modules and focused fixture owners rebuilt; 7/7 runtime tests pass, zero skips:
guest_formatting,guest_scan_count,guest_wide_stream_scan,guest_wide_formatting,guest_crt,guest_stdio_variadic,guest_strings. Matching pinned main passes all25 selected baseline groups. Production NID patching, conventions/whitespace, and MinGW syntax forFormatting.cpp,StdioExtras.cpppass. A frozen guest_stdio_variadic executable fails at the clamped-width assertion with only the prior child/main Formatting.cpp restored. Exact restoration passes and reproduces source, library and executable hashes.Public-header audit: failed on both pinned main and this head with the same five missing
WKSecurityOrigin*declarations (Create,CopyToString,CopyHost,CopyProtocol,GetPort), with no additional declaration errors. The failure is retained in the logs; no all-green header/full-suite claim is made. The concrete shared-main repair is #16010, exact head545e24b2ee2e549001421f7fc9f87ff801f3423c. Its independent qualification reports a green audit of 406 libraries/30,572 exports and two standalone units compiled by each of GCC and MinGW. A maintainer still needs to merge that repair and rerun the affected checks; this unmodified qualification tree is not relabelled header-green.The older-main Windows
DepthSurface::createSampleShadowallocation compile error is already corrected by merged #15855. This head contains that fix, and its DepthSurface.cpp/ImageMemory.hpp blobs match the fixing source. The fix’s hosted Windows build passed; that is attributed upstream evidence, not a Windows build/runtime result for this head. No duplicate AGC change was added. A final merge preview against newer main7ad9749ed0311cc91d69bc7c690d09c92b9d42d0is clean; qualification remains pinned to6d173c1a19788ff69d43b3d0ca62833e312ef939.Source/parent/provider/gitlink proofs, commands, raw logs, JUnit, hashes and known baseline failure. Historical platform, module-reference and performance reports below retain their original pins; no new Windows/macOS, SDK/physical-console, title/GPU or performance run.
Earlier pinned reports and the contribution template follow.
Refreshed against main
0263899e996f26b165aed37f6b5a616dd1d4c6bb; current head6a3e6798b1e94118988bbb41fdab6c3830abe74bretains previous public headed55fbdf74855878b2d4f5f73e7e51c9ec23458band main as ancestors. The conflict resolution preserves the topic behavior and current-main ordinary-scan/input-failure handling and fixtures.The same seven fixtures (
guest_formatting,guest_scan_count,guest_wide_stream_scan,guest_wide_formatting,guest_crt,guest_stdio_variadic,guest_strings) pass three times on main and on this head: 21 executions per arm, zero failures/skips. The last two run in a separate scoped build with the actual PosixForWebKit/Net/NetCtl/kernel_sys/LibcInternal dependency owners. Public-header audit, conventions and whitespace checks pass. These are actual scoped libc/kernel/Ampr owners and selected fixtures with existing frozen ZArchive/zstd providers, not a whole-project build. No new Windows, title-unblock or performance claim.Raw build/test/JUnit logs, commands, source patches, conflict resolutions and binary hashes, SHA-256
fd8ddb6a38a010916d71698df9cb60011e9800fe14db63baa9f4eca21e6b8e4f(download verified). The batch has 87 successful fixture executions in total; setup failures and corrected final qualification are retained in the archive.Previous report and contribution template, with historical pins preserved:
What
Depends on #9087. Current head
ed55fbdf74855878b2d4f5f73e7e51c9ec23458bincludes actual parentd44f653788366cfa07727a8ae52088a0675f129fand pinned mainb11c7bf84f5d2f636ff60166cc3371bd071e24d5. Original child, prerequisite and reviewer commits remain ancestors. #9935’s default-handler change is already on main through merged #10270.sprintf_sandvsprintf_snow check their arguments and output the way thelibc.prxthat titles ship does. Onmainthey formatted with no checks at all: a null buffer crashed, and output that didn't fit was silently truncated. They now share #9087's secure conversions through a newFormatTerminatednext toFormatSecure, but follow their own violation rules. Measured natively on PPSA07923 and PPSA05916, which agree:SIZE_MAX >> 3"<name>: bad argument"buf[0] = '\0',"<name>: bad format argument"size - 1characters and clears the first,"<name>: buffer overflow"withERANGE%n, null%s"printf_s: %n disallowed"/"printf_s: bad %s argument"%nafter text that already filled the buffer"<name>: buffer overflow"<name>issprintf_sorvsprintf_s; the two use their own names. The handler always gets a null pointer. Unlikesnprintf_s, every violation returns 0, never a negative value.On Windows the two functions were defined in
StdioExtras.cpp, outside theFormatting.cppblock thatsnprintf_suses. They move next tosnprintf_s, so both platforms shareFormatTerminated. A debt entry records the rule.Depends on #9087, for
FormatSecureand its secure conversions. Its current sharedSonyRsizeMaxsupplies the same 2^61 - 1 size bound formerly calledsecureSizeMax. Main’s default handler writes and returns. Main’s narrow printf literal behavior for unknown%y/%kconversions is retained; scanner unknown conversions still stop before the contiguous secure branch.Tested
Current-main integration — 2026-11-04. Head
ed55fbdf74855878b2d4f5f73e7e51c9ec23458bincludes mainb11c7bf84f5d2f636ff60166cc3371bd071e24d5and preserves previous public commits and attribution/licence notices. Includes actual current #9087. Its sharedSonyRsizeMaxreplaces the child’s stale private constant reference with the sameSIZE_MAX >> 3bound. Narrow printf%y/%kretain main’s literal-format behavior with exact result/output/no-handler assertions; the scanner unknown-conversion exit remains before its contiguous secure path. The compile failure from the stale reference is retained. Actual open prerequisite #9087 headd44f653788366cfa07727a8ae52088a0675f129fis an ancestor.Linux x86-64, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON: rebuilt actual libc/Ampr and selected executables.
guest_formatting,guest_stdio_variadic,guest_scan_count,guest_wide_stream_scan,guest_wide_conversion,file_streams,guest_strings,guest_safe_errors,guest_crteach pass 3/3 (27 runtime passes, zero skips);public_headers, conventions and whitespace checks pass. Pinned main passes all 17 selected baseline groups 3/3 (51 passes) plus headers. Before/after dependency checks agree: 34 recursive trees and 31,551 tracked blobs, zero errors; the update=none QuickJS test262 corpus is explicitly excluded from these library inputs.Source/parent/gitlink proofs, library/test hashes, raw logs/JUnit and head-leased push receipts: qualification archive, SHA-256
7c347f620951ad6f39068740750949212c6412815da094a46a96eca1d15c8bbf(download verified). Older platform, stress, negative-control and reference reports retain their original pins; no new Windows/macOS, full-suite, SDK-module, console, title/GPU or performance claim. AI-assisted: yes (Codex).Earlier dated qualifications below retain their original source/platform pins.
Current-main refresh — 2026-11-02. Published head
a65a15bdf7f81e00569ade98e191f4c75b4ae026includes pinned maina4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. The source.Peek wide-bounds adaptation was already delivered in57711a6 (reply6583632302), using actual #9087 head24f4242c. This refresh keeps that wide block byte-identical and retains the maintainer529a1e6/prior public history and actual parent ancestry. The new a4 conflict was main’s unknown-conversion guard versus the contiguous secure branch: main’s guard now precedes the secure path. A frozen guest_formatting executable fails when only this guard is removed, then passes after exact restoration with identical libc/test hashes. No new tests or unsupported native-call assertions were added. Both Formatting.cpp and FormattingWide.cpp pass MinGW syntax; this is not Windows runtime qualification.Rebuilt actual libc/Ampr and selected tests from the final input tree.
guest_formatting,guest_wide_formatting,guest_stdio_variadic,guest_scan_count,guest_wide_stream_scan,guest_wide_conversion,file_streams,guest_strings,guest_safe_errors,guest_crteach pass three consecutive runs: 30 runtime passes, zero skips, plus public_headers. Conventions and whitespace pass. Source/input manifests, exact dependencies, library/test hashes, logs/JUnit and head-leased push receipts are attached. The same pinned main passes 18 selected groups three times (54 runtime passes) plus headers. All 34 recursive dependency trees/31,551 tracked blobs verify with zero errors; QuickJS’s update=none test262 corpus is explicitly excluded because it is not a library build input.Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON. Focused Linux CPU qualification only plus MinGW syntax. Older Windows/module/reference reports retain their original pins; no fresh Windows/macOS, SDK-module, console, title/GPU or speed claim. AI-assisted: yes (Codex).
Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-six-main-a4eca-linux-extra10321-20261102.tar.gz; SHA-256 525ccb31a5d3d0f5adced5fda58818d8432f06c0afa7290139adb60ae6664b54.
Earlier dated qualifications below retain their recorded source/platform pins.
Exact head
57711a6544ba2f4c2679fcb840e23f8c548bb159, Linux 7.2.11/glibc 2.44, Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON. Rebuilt actual libc and all selected test executables.guest_formatting,guest_scan_count,guest_wide_formatting,guest_stdio_variadic,guest_crt,file_streams,guest_strings,guest_wide_strings,guest_safe_errors: each passes three runs (27 passes, zero skips). Includes both main's byte-based wide scanner fixtures and the prerequisite's measured secure bounds/width cases, alongside this PR's terminated-format checks.guest_formatting_testsexecutable fails inCheckTerminatedFormatwhen only the Linux sprintf_s/vsprintf_s export bodies are restored to actual prerequisite fix(libc): follow snprintf_s and sscanf_s constraints as measured on a PS5 #9087's implementation. Restoring this implementation restores both source and the actual loadedlibs/unpatched/libc.prxbyte-for-byte and passes again. The loader path and SHA-256 identities are recorded.Exact pins, original and final patches, composition proof, build/test/JUnit logs and frozen negative/restore control, SHA-256
6d8bb229b1c62d15d2b49f56a7e2c620d73831a3ebe19470a44c1f6a7105bae6.The original module measurements and prior Windows runs retain their earlier pins in historical qualification. No new exact-head Windows, SDK-module, console, title, GPU or performance claim. The prerequisite author's Windows/Linux scanner results are their independent report, not relabelled as our current-head execution.
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)1c3b118df8c062114d7962b48dbc39cfa4105496; fix(libc): write the constraint message and return from the default handler #9935 fulfilled through merged fix(libc): bound and report the Annex K copies as measured on a PS5 #10270)