[libcxx-commits] [PATCH] D158940: [libc++][format] Fixes out of bounds access.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 28 08:55:28 PDT 2023


Mordante added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp:53-60
+  // reproducer of https://llvm.org/PR65011
+  try {
+    const char fmt[] = {'{', '0'};
+    char buf[4096];
+    [[maybe_unused]] auto ignored =
+        std::vformat_to(buf, std::string_view{fmt, fmt + sizeof(fmt)}, std::make_format_args());
+  } catch (...) {
----------------
Guard this block for the no-execption build.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158940



More information about the libcxx-commits mailing list