[libcxx-commits] [libcxx] [libc++] Add an ABI setting to harden unique_ptr<T[]>::operator[] (PR #91798)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 10 12:43:44 PDT 2024


ldionne wrote:

Note that this patch is kind of a WIP. Another approach could be to query the compiler or the system allocator for the size of the allocation. I actually think the compiler knows the size of the allocation cause it encodes it at the front of the allocation when calling `operator new[]`, but I have to refresh my memory on this.

https://github.com/llvm/llvm-project/pull/91798


More information about the libcxx-commits mailing list