RFR: 8273414: ResourceObj::operator delete should handle nullptr in debug builds

Leo Korinth lkorinth at openjdk.java.net
Tue Sep 7 13:42:35 UTC 2021


On Tue, 7 Sep 2021 09:40:33 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

> This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr.

Thanks for the review Thomas!

The test failure of `Pre-submit tests - Linux x64 - Test (tier1)` is due to Shenandoah (JDK-8271834). I added a comment to that bug that it is probably not solved, I saw that you reported the bug so you might be interested.

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

PR: https://git.openjdk.java.net/jdk/pull/5385


More information about the hotspot-runtime-dev mailing list