[libc-commits] [libc] [libc] Implement cpp::unique_ptr utility (PR #206701)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Tue Jul 28 13:49:09 PDT 2026
vonosmas wrote:
ASan buildbot complaints are interesting -- looks like we roll out own `operator delete`, which simply calls `::free` - https://github.com/llvm/llvm-project/blob/93d45dce2fc704e28bacb1eea399fb9900385418/libc/src/__support/CPP/new.cpp#L12
but we don't provide the `operator new` in libc/src/__support/CPP/new.h - there's only placement new there: https://github.com/llvm/llvm-project/blob/93d45dce2fc704e28bacb1eea399fb9900385418/libc/src/__support/CPP/new.h#L41
I suspect that on the ASan bot `operator new` is just taken from the ASan runtime itself (it does provide the allocator). I think this is somewhat problematic, though it's probably not an issue that is introduced by this PR, only exposed by it.
What is the expected behavior for new/delete inside llvm-libc if we're using (a) overlay build with system glibc+allocator (b) scudo as a memory allocator (c) internal allocator for fully-hermetic builds?
In either case, we probably shouldn't leave ASan bots red, so I wonder if it's worth reverting it now.
https://github.com/llvm/llvm-project/pull/206701
More information about the libc-commits
mailing list