[libcxx-commits] [libcxx] [libc++] Add an ABI setting to harden unique_ptr<T[]>::operator[] (PR #91798)
Vitaly Buka via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 29 16:08:37 PDT 2024
vitalybuka wrote:
> @vitalybuka I just stumbled upon `-fno-sanitize-address-poison-custom-array-cookie` and learned that ASAN sometimes poisons array cookies when a custom `operator new` is in use. I'm not certain I understand why poisoning the array cookie is legal even when we have a custom `operator new[]`, but it seems like poisoning array cookies would interact badly with this patch. Do you have thoughts?
I see this feature for the first time :)
Looks like @filcab added the feature. Before that custom new was omitted, then
https://reviews.llvm.org/D41301 made it more aggressive
https://reviews.llvm.org/D52615 hidden the change above by the flag
And the doc string was gone with https://reviews.llvm.org/D133349
I believe this is off by default "use at your own risk" feature.
I guess it should be easy to support this case by `__attribute__((no_sanitize("address")))` on __get_array_cookie
https://github.com/llvm/llvm-project/pull/91798
More information about the libcxx-commits
mailing list