RFR: 8305590: Remove nothrow exception specifications from operator new
Kim Barrett
kbarrett at openjdk.org
Tue Apr 18 19:02:53 UTC 2023
On Tue, 18 Apr 2023 15:18:34 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> - The `throw()` (i.e., no throw) specifications are removed from the instances of `operator new` where _do not_ return `nullptr`.
>>
>> - The `-fcheck-new` is removed from the gcc compile flags.
>>
>> - The `operator new` and `operator delete` are deleted from `StackObj`.
>>
>> - The `GrowableArrayCHeap::operator delete` is added to be matched with its corresponding allocation`AnyObj::operator new`, because gcc complains on that after removing the `-fcheck-new` flag.
>> - The `Thread::operator new`with and without `null` return are removed.
>>
>> ### Tests
>> local: linux-x64 gtest:GrowableArrayCHeap, macosx-aarch64 hotspot:tier1
>> mach5: tiers 1-5
>
> src/hotspot/share/runtime/thread.hpp line 203:
>
>> 201: static bool is_JavaThread_protected_by_TLH(const JavaThread* target);
>> 202:
>> 203: void operator delete(void* p);
>
> Should you have removed delete and Thread::allocate() also? is Thread::allocate now unused?
I was thinking the same thing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13498#discussion_r1170457293
More information about the serviceability-dev
mailing list