You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/input.output/iostream.format
Dimitry Andric 2f214595bc Ensure showbase does not overflow do_put buffers
Summary:
In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
std::showbase with ostreams can cause truncation of unsigned long long
when output format is octal.  In fact, this can even happen with
unsigned int and unsigned long.

To ensure this does not happen, add one additional character to the
do_put buffers if std::showbase is on.  Also add a test case.

Reviewers: EricWF, mclow.lists

Reviewed By: EricWF

Subscribers: cfe-commits, emaste

Differential Revision: https://reviews.llvm.org/D32670

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302362 91177308-0d34-0410-b5e6-96231b3b80d8
9 years ago
..
ext.manip [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 1/7. 9 years ago
input.streams Add markup for libc++ dylib availability 9 years ago
output.streams Ensure showbase does not overflow do_put buffers 9 years ago
quoted.manip [libcxx] [test] Fix comment typos, strip trailing whitespace. 9 years ago
std.manip Move remaining _LIBCPP_VERSION tests into test/libcxx 10 years ago
nothing_to_do.pass.cpp Move test into test/std subdirectory. 11 years ago