RFR: JDK-8076450 com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: assert(!on_C_heap() || allocated_on_C_heap()) failed: growable array must be on C heap if elements are
Markus Gronlund
markus.gronlund at oracle.com
Wed Apr 1 09:42:05 UTC 2015
Hi Staffan,
Looks good!
Thanks
Markus
-----Original Message-----
From: Staffan Larsen
Sent: den 1 april 2015 10:47
To: hotspot-runtime-dev at openjdk.java.net >> 'hotspot-runtime-dev'
Subject: RFR: JDK-8076450 com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: assert(!on_C_heap() || allocated_on_C_heap()) failed: growable array must be on C heap if elements are
This is a fix for a regression caused by JDK-8074895: "os::getenv is inadequate”. That fix allocates a GrowableArray on the stack, but the elements are allocated on the C-heap. This is not allowed by GrowableArray and it asserts. The fix is to allocate the GrowableArray on the C-heap as well. Note that we do not have a resource area to allocate on this early in the startup.
Also found a missing os::free() for the allocated buffer in the method.
webrev: http://cr.openjdk.java.net/~sla/8076450/webrev.00/ <http://cr.openjdk.java.net/~sla/8076450/webrev.00/>
bug: https://bugs.openjdk.java.net/browse/JDK-8076450 <https://bugs.openjdk.java.net/browse/JDK-8076450>
Thanks,
/Staffan
More information about the hotspot-runtime-dev
mailing list