[libcxx-commits] [PATCH] D146294: [libcxx] Fix crash in std::stringstream with payload >= INT_MAX

Azat Khuzhin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 20 08:26:34 PDT 2023


azat marked 2 inline comments as done.
azat added inline comments.


================
Comment at: libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp:24
+
+  for (size_t i = 0; i < (2ULL << 30) - payload.size(); i += payload.size()) {
+    assert(ss.tellp() != -1);
----------------
philnik wrote:
> azat wrote:
> > I'm not sure that the test that allocates 2GiB of RAM is good for your CI, so please let me know.
> This should be fine. It's probably not actually allocated anyways.
Sadly but it will allocate 2GiB of RAM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146294/new/

https://reviews.llvm.org/D146294



More information about the libcxx-commits mailing list