fix(libc): count wide string precision in output characters #427
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/427"
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 RomainROCH on 2026-10-03T02:23:05Z.
What
Count the precision of narrow strings in wide formatting in the UTF-16 units produced, rather than UTF-8 input bytes. Preserve complete surrogate pairs when the remaining precision is too small.
For example,
%.2swith two UTF-8 accented characters previously returned only the first character.Tested
Source commit:
5211ba115bcbb4abdb7d7468f6126dd8f8abc10f, based onmainate006f64237e49d8ad4c054ef0c197a1d20fada50.The full upstream Build workflow succeeded on Linux and Windows. It checked out merge commit
6ae9fbf3c0538042973b6823f8eb12a92e7ae29c; its treef62127ee5c4ea8a2d16077d5977ced4b08e825f8is identical to the source commit's tree.Both platforms used Release configuration, Ninja and GCC/G++ 15.2.0, built the default and
libstargets, and ran CTest with--repeat until-fail:3. The full CTest run includes the registered relinker tests.Each platform registered 162 tests; the passed column excludes skipped tests. The focused
guest_wide_formattingregression passed in all three repetitions on both platforms. The existingfile_positiontest setup was retained when resolving the CMake conflict.Skipped GPU/AGC execution tests
Linux:
agc_driver_pixel_helper_lanes,agc_driver_read_first_lane,agc_driver_read_lane,agc_driver_scalar_bit_count,agc_driver_wave_uniform,agc_driver_write_lane.Windows:
agc_driver_cache_control,agc_driver_float16_misc,agc_driver_float16_rounding,agc_driver_fma_rounding,agc_driver_image_atomics,agc_driver_image_sample_lod_clamp,agc_driver_integer_dot,agc_driver_lds_atomics,agc_driver_mix_precision,agc_driver_pixel_helper_lanes,agc_driver_read_first_lane,agc_driver_read_lane,agc_driver_scalar_bit_count,agc_driver_scalar_relative_indexing,agc_driver_scalar_sopk_compare,agc_driver_sdwa_destination,agc_driver_shader_clock,agc_driver_vop1_control,agc_driver_vop3_aliases,agc_driver_vop3_compare_modifiers,agc_driver_vop3_integer,agc_driver_vop3_lerp,agc_driver_vop3_sad,agc_driver_vopc_compare,agc_driver_vopc_compare_f64,agc_driver_wave_id_in_workgroup,agc_driver_wave_sleep,agc_driver_wave_uniform,agc_driver_write_lane.An isolated local check with GCC 16.1 could not link (
__gxx_personality_v0), so it did not execute. The successful checks above are the full upstream workflow on the specified commit, including the wide-formatting regression.Coverage includes ASCII, accented characters, zero precision, short strings, no precision, padding, and supplementary characters at precision boundaries. All fixtures are synthetic. No game or homebrew title was tested; these results do not establish game compatibility.
Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T01:40:03Z.
This now conflicts with main after #428 touched the same libc test setup; could you rebase? The change itself looks right to me (C11 counts precision in output units).