[libcxx-commits] [PATCH] D158823: [libc++][hardening] Add back the safe mode.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 29 18:08:25 PDT 2023


var-const marked 2 inline comments as done.
var-const added inline comments.


================
Comment at: libcxx/include/__config:319
+#    define _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(expression, message)     _LIBCPP_ASSERT(expression, message)
+// TODO(hardening): don't enable uncategorized assertions in the safe mode.
+#    define _LIBCPP_ASSERT_UNCATEGORIZED(expression, message)            _LIBCPP_ASSERT(expression, message)
----------------
ldionne wrote:
> thakis wrote:
> > TODO when? After a security review of these asserts? Something else? Do you have a rough time frame when this might happen?
> IMO this TODO is not necessary. We know we want to remove `_LIBCPP_ASSERT_UNCATEGORIZED` anyway so it would become moot.
@thakis I certainly want to do this before the next release (i.e., LLVM 18), and ideally even earlier. And yes, that would include a security review.


================
Comment at: libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp:13
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: !libcpp-hardening-mode=debug
+// UNSUPPORTED: !libcpp-hardening-mode=safe && !libcpp-hardening-mode=debug
 // XFAIL: availability-verbose_abort-missing
----------------
ldionne wrote:
> 
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158823



More information about the libcxx-commits mailing list