RFR: 8305590: Remove nothrow exception specifications from operator new [v3]

Julian Waters jwaters at openjdk.org
Sun Apr 23 18:34:54 UTC 2023


On Thu, 20 Apr 2023 08:41:58 GMT, Afshin Zafari <duke 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
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8305590: Remove nothrow exception specifications from operator new

I believe this may have missed removing the exception specifier from an operator new inside AnyObj, allocation.cpp, since gcc 12 and up on my end now refuses to compile HotSpot with this change. I'll create a cleanup change for this, if there isn't any opposition to that

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13498#issuecomment-1519127682


More information about the serviceability-dev mailing list