RFR (M): 8238854: Remove superfluous C heap allocation failure checks
thomas.schatzl at oracle.com
Thu Feb 13 09:59:24 UTC 2020
Hi Kim, Stefan,
On 13.02.20 01:51, Kim Barrett wrote:
>> On Feb 12, 2020, at 7:16 AM, Stefan Johansson <stefan.johansson at oracle.com> wrote:
>> Hi Thomas,
>>> 12 feb. 2020 kl. 13:10 skrev Thomas Schatzl <thomas.schatzl at oracle.com>:
>>> Although I think all users of new for MemRegion expect it to fail (the only other user in filemap.cpp will crash with NPE a few lines after allocation), this needs more investigation because the change introducing the new operator talks about some clang compatibility issue (from 2003). But it also indicates that the problem occurred only on a use that is not in the code base any more (JDK-8021954 ftr, it is a closed issue that can't be opened).
>>> (Note that my testing did not reproduce the failure, but, the code is not used in the crashing component, i.e. metaspace handling, any more).
>>> http://cr.openjdk.java.net/~tschatzl/8238854/webrev.0_to_1/ (diff)
>>> http://cr.openjdk.java.net/~tschatzl/8238854/webrev.1/ (full)
>> I agree with your reasoning above and think this is good.
> I agree too. Looks good.
> Maybe file an RFE to look at this? MemRegion allocator functions are declared throw(), which is
> atypical and definitely strange for us. When building with gcc we use -fcheck-new. I’m not sure
> how those interact, or exactly what -fcheck-new does, or whether we actually need -fcheck-new.
Filed JDK-8238999; thanks for your reviews.
More information about the hotspot-gc-dev