fix(libc): bound narrow formatting fields #11332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11332"
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 Queuse on 2026-10-26T03:58:01Z.
What
Windows narrow printf can misreport oversized fields or fail while formatting even a valid INT_MAX width into a tiny buffer (#11292). Check field bounds and stream padding and precision zeros while retaining the full output count. Overflow returns -1 with guest EOVERFLOW (84).
Draft for integration coordination: #9087 goes first (confirmed) and is still open. The #9958-first and #11341-first orders are now fulfilled: both are merged. The rebase after #9087 lands must retain deferred termination in Pad, the console long-double mantissa handling and #11341's portable
GuestLongDoubleLoadpath. #5021 was closed by its author on 2026-11-12. The published head and its tests below remain unchanged while #9087 is pending.Tested
Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 UCRT r7, Ninja Release, BUILD_TESTING=ON. Head
793a55ba18on main33ae5a3146.No full product suite, Linux product build, title or physical-console run. Extreme-field console error behavior remains unmeasured and is recorded in debt/libc.md.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T07:22:48Z.
Review: COMMENTED
I inspected the live overlap rather than relying only on the bot table. A two-head
git merge-treepreview between this head (793a55ba18) and #11341 (fcb72551ab) conflicts inWindowsFormatting.hpp. #11341 changesFormatArguments::Next<long double>to useGuestLongDoubleLoadand removes the native-long-double layout assertions; this formatter rewrite must preserve that portable long-double path when the two changes are combined. Please coordinate the order with #11341’s author and record the dependency/order in the checklist. The #9958-first / #5021-after order is still marked pending in this draft, so keep it explicit as those authors confirm it; I am not asking anyone to close a PR.The branch is also 1 ahead and 92 behind current
main(fdb3925940), with a clean merge preview butdocs/dev/debt/libc.mdchanged on both sides since the base. CONTRIBUTING says to keep branches current; please rebase after the stack order is settled, preserve the overlapping debt edits, and rerun the focused Windows formatters and local overlap/convention checks on that exact head. I am not approving this draft before those integration and current-head checks.Pull request closed