RFR: 8306579: Consider building with /Zc:throwingNew [v2]

Kim Barrett kbarrett at openjdk.org
Thu Nov 21 07:12:16 UTC 2024


On Thu, 21 Nov 2024 06:19:32 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> One thing I have a query on: Does this need the problem with the ADLC operator new to be fixed before it can be integrated?

For those following along, the bug being referred to is this:
https://bugs.openjdk.org/browse/JDK-8342639
Global operator new in adlc has wrong exception spec

I think that's not a blocker for this change. With this change, `new`
expressions that call that function won't implicitly check for null. That
would be a problem if that function could return null. But it calls the normal
global `operator new(size_t)`, which doesn't return null, instead throwing on
failure. And if that call failed, that throw would hit the nothrow exception
specification of the adlc-supplied definition, and call std::terminate. I'm
pretty sure that's where it would end up anyway, in the absence of the nothrow
exception specification, since I don't think there's any exception handling in
adlc.

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

PR Comment: https://git.openjdk.org/jdk/pull/22039#issuecomment-2490233842


More information about the build-dev mailing list