[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 14:19:05 PST 2017


vsapsai created this revision.

It covers the cases when the sentry object returns false and when an exception
was thrown. Corresponding standard paragraph is C++14 [istream.unformatted]p9:

  [...] In any case, if n is greater than zero it then stores a null
  character into the next successive location of the array.

rdar://problem/35566567


https://reviews.llvm.org/D40677

Files:
  libcxx/include/istream
  libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp
  libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40677.125019.patch
Type: text/x-patch
Size: 6632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171130/48700ff1/attachment.bin>


More information about the cfe-commits mailing list