[libcxx-commits] [libcxx] [libc++][hardening] Classify assertions related to leaks and syscalls. (PR #77164)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 9 13:02:25 PST 2024
================
@@ -68,7 +68,8 @@ class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator {
}
_LIBCPP_HIDE_FROM_ABI void deallocate(_ValueType* __p, size_t __n) {
- _LIBCPP_ASSERT_UNCATEGORIZED(__n <= __max_size(), "deallocate called for size which exceeds max_size()");
+ // This would cause an integer overflow, resulting in too few objects being deleted.
----------------
ldionne wrote:
Minor minor comment: maybe find a way to roll up that comment into the error message?
https://github.com/llvm/llvm-project/pull/77164
More information about the libcxx-commits
mailing list