[libcxx-commits] [PATCH] D154997: [libc++][hardening] Deprecate `_LIBCPP_ENABLE_ASSERTIONS`.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 10 12:28:58 PDT 2023


ldionne added a comment.

In D154997#4574222 <https://reviews.llvm.org/D154997#4574222>, @thakis wrote:

> [...]
>
> Maybe `_LIBCPP_ASSERT_UNCATEGORIZED` and friends could only be defined if they aren't already defined, then we could map all of them to `_LIBCPP_ASSERT` and not define `_LIBCPP_ENABLE_DEBUG_MODE`? Then I think we'd have what we used to have and what we currently ship.
>
> Does that sound correct?
>
> (For example, one thing that the old asserts caught and that our tests verify libc++ catches but which isn't caught in hardened mode is `string_view(ptr, -1)`.)

Just to give an update, we talked about it with @var-const and @thakis just now and we plan to add a new mode that contains the barebones hardening assertions, and also other assertions that are not expensive but also not the strict minimum security-wise. That's the mode that Chromium would want to use, since it'd be very close to the old "safe" mode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154997



More information about the libcxx-commits mailing list