Repository navigation
Conversation
…t in the wide printf family The wide printf family rejected the q length modifier, the D, O and U conversions, unknown conversion characters and a format ending in a percent sign, which FreeBSD 11.4 vfwprintf formats: q is long long, D, O and U are the long forms of d, o and u, an unknown conversion character prints itself with the width and the - flag, and the format ends at a trailing percent sign. swprintf, vswprintf and wprintf now do the same; snwprintf_s keeps rejecting them.
…te pair whole as an unknown conversion snwprintf_s accepted the q length modifier through the shared parser and now rejects it again. An unknown conversion character that is a surrogate pair is printed as one character, so the width padding no longer splits the pair.
|
Which title prints |
|
I do not have title traces or Dinkumware _Printf evidence for these wide-format cases. The current evidence is FreeBSD 11.4 behavior and Linux-side tests, so I cannot claim console compatibility for %q, %D/%O/%U, unknown conversions, or a trailing %. I agree this leaves the added behavior unverified against the console; absent title or _Printf evidence, main’s throw is safer. I will avoid presenting these cases as title-required until we have that evidence. |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the fix. Blocking points:
- The console's
libc.prxformats through Dinkumware's_Printf, not FreeBSD'svfwprintf. As discussed above, neither a title nor_Printfevidence shows that%q,%D/%O/%U, unknown conversions (with width) or a trailing%behave as FreeBSD 11.4 does there; main's throw is the safe behaviour until then. Evidence that would unblock it: the relevant branches of_Printfdisassembled from a title'slibc.prx(same approach as in #3987), or a title that reaches these cases. - Once evidence exists, the branch conflicts with main in
core/libs/tests/GuestWideFormatting.cpp; it needs a rebase.
|
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.
|
|
Thanks for the detailed blocking review. I have no new title trace or Dinkumware |
What
Fixes #5293. The wide
printffamily now accepts FreeBSD'sqlength modifier and%D,%O, and%Uconversions, prints unknown conversion characters with their width, and stops cleanly at a trailing%. The securesnwprintf_spath continues rejecting these extensions. The tests cover surrogate-pair and lone-surrogate conversion characters as well.The two upstream implementation commits retain Hussein Kadhim as their author. A separate test-placement commit is authored by MarcZX100.
Tested
guest_wide_formattingandguest_formattingpassed (2/2).git diff --checkpassed.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository