Repository navigation
fix(libSceLibcInternal): clamp the string count as size_t on macOS - #17532
Conversation
String::size is std::uint64_t, so the clamp passed std::min an unsigned long and an unsigned long long on macOS, where they are distinct types, and the call did not compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows regression check of PR head |
|
Windows check of 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. |
|
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.
|
What
libSceLibcInternaldoes not compile on macOS onmain:Clamppassescount(std::size_t) andsource->size - positiontostd::min.GuestLocale::String::sizeisstd::uint64_t, so the second argument isstd::uint64_t. On macOSstd::size_tisunsigned longandstd::uint64_tisunsigned long long, sostd::mincannot deduce one type. This names the type asstd::min<std::size_t>, as other files do.Both types are 64-bit unsigned on every target, so the value does not change. On Linux and Windows they are already the same type.
Tested
macOS 27.3, Apple M5 Pro, Apple clang, x86_64 Release under Rosetta 2. Tree:
main095ff72367with #16591 and #17425, which macOS still needs to buildlibs. Nothing underlibSceLibcInternalorGuestLocale.hppchanged between that commit andmain0bae53facd.ninja -k 0 libsfails onBasicString.cpp:45with the error above.libs(407 libraries, NID patching included) andrelinkerbuild.guest_libc_internal_basic_stringis registered only on Linux and MinGW. Enabled locally on macOS, it does not build, becauseGuestSceV2Exceptions.Suses ELF section directives. So it was not run.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