[all-commits] [llvm/llvm-project] 372dc9: [libc++][format] Don't leave the output buffer ful...
ykiko via All-commits
all-commits at lists.llvm.org
Sun Sep 27 18:48:45 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 372dc97670f7b3ce422dc26e5f626b2711426e8d
https://github.com/llvm/llvm-project/commit/372dc97670f7b3ce422dc26e5f626b2711426e8d
Author: ykiko <ykiko at clice.io>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
M libcxx/include/__format/buffer.h
A libcxx/test/std/utilities/format/format.functions/bug_154670.pass.cpp
Log Message:
-----------
[libc++][format] Don't leave the output buffer full after a bulk write (#226791)
__output_buffer::push_back writes a code unit before it makes room, so
the buffer must always have a free one. __copy, __transform and __fill
write in chunks of the available space and could end with the buffer
full. Formatting into a back_insert_iterator of a string, vector or
deque goes through a 256 code unit buffer, so an argument or fill whose
length is a multiple of 256, followed by a literal, wrote that literal
past the end of the buffer.
Make room in a full buffer at the end of these functions, as push_back
does.
Fixes #154670
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list