RFR: 8316930: HotSpot should use noexcept instead of throw() [v4]
Kim Barrett
kbarrett at openjdk.org
Wed Jul 24 20:57:37 UTC 2024
On Sun, 4 Feb 2024 23:09:33 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> I think EXIT_OOM is an implementation detail. The key point is that these methods do not throw.
>
> Or do I have that backwards ... the key point of `no_except` is that callers of these method must check for `nullptr`, but with EXIT_OOM that is not the case - and we don't want it to appear that the allocation can actually fail and we continue execution!
It looks like there are a number of `operator new`s that have nothrow exception specs but shouldn't.
CompilationResourceObj in the immediately preceding file, for example.
A precursor cleanup (or maybe several) that removed those first would be nice.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15910#discussion_r1690410887
More information about the hotspot-dev
mailing list