Repository navigation
feat(libc): implement swscanf - #4467
Conversation
Progress report (bf8dc61 → 8aa0d42)➖ System libraries: 88.18% (+0.0%, +1 implemented functions) ✅ 1 implemented
|
|
The
So with #3787 and AI-assisted: yes (Claude Code) |
|
Windows validation with title evidence (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, PS5CEMU-HAR (PPSA99360): with #4514 in, the title's stop is |
|
Title run with this PR: Windows 11, MinGW GCC 15.2.0 (WinLibs), Release, on
AI-assisted (Claude Code). |
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: Head is |
swscanf (HNnWdT43ues) runs the swscanf_s scanner without the buffer size arguments after %s, %c and %[, as FreeBSD's swscanf.c passes its arguments to vswscanf. Both entry points share one engine with a flag for the sizes; swscanf_s behaves as before. Title: PS5CEMU-HAR PPSA99360 imports swscanf from libSceLibcInternal.prx (import audit with --trap-sdk-syscall-stubs, registry index 292, right after pthread_setaffinity_np at 276). Predicted stop line once pthread_setaffinity_np resolves, without this change: FAIL: unresolved ELF import HNnWdT43ues (swscanf) from libSceLibcInternal.prx NID from tools/nid_names.py, confirmed in shadPS4 aerolib.inl:51950 (e0a466753a1a). Prototype in ps5-payload-dev include/freebsd/wchar.h:133, export in sce_stubs/libSceLibcInternal.c:8582 (f5d40f02770e). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4628309 to
8aa0d42
Compare
|
Rebased onto main (bf8dc61) and force-pushed: the swscanf debt entry now sits in |
What
Implement the missing 16-bit guest
swscanfexport by sharing the existingswscanf_sscanner without consuming the secure buffer-size arguments after string, character and scanset conversions. Keep the existing refusal behavior for unsupported conversions and widen the documented scanner limitations to cover both entry points.Add regression coverage for integer, floating-point, string, character, scanset,
%n, suppression, width, partial-match, EOF, null-input and unsupported-format behavior.This carries screamm's offered commit from issue #4464 unchanged and preserves its authorship.
Closes #4464.
Tested
BUILD_TESTING=ONguest_wide_conversion_testsand its 52-step libc dependency target successfullyctest --test-dir build -R '^guest_wide_conversion$' --output-on-failure(3/3 passed)python tools/check_conventions.py --base origin/maingit diff --check origin/mainpython tools/check_test_registration.py build(705 executables, none unregistered)Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository