[libcxx-commits] [PATCH] D150610: [libc++] Make sure `operator new` never returns nullptr, even under -fno-exceptions
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 17 10:04:14 PDT 2023
EricWF added a comment.
In D150610#4343811 <https://reviews.llvm.org/D150610#4343811>, @ldionne wrote:
> Pinging vendors for discussion.
>
> In particular, @EricWF it would be nice to know how Google feels about this, given that it's a large code base built using `-fno-exceptions` (presumably the dylib too?).
Let me test it and find out.
> Also, @jwakely I'd like to know how you feel about the fact that `new(size_t, nothrow_t)` aborts instead of returning `nullptr` when the shared library is built using `-fno-exceptions`. Is that a concious choice you made in libstdc++, and if so, what's the rationale? Naively, I would say this surely seems a bit surprising, but it seems to be the only way to satisfy the Standard's requirements under `-fno-exceptions` (since the `nothrow_t` version must call the throwing version).
Yeah, I'm curious about this too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150610/new/
https://reviews.llvm.org/D150610
More information about the libcxx-commits
mailing list