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
Frederic Parain
frederic.parain at oracle.com
Wed Apr 1 09:18:52 UTC 2015
Looks good to me.
Fred
On 04/01/2015 10:46 AM, Staffan Larsen wrote:
> 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
>
--
Frederic Parain - Oracle
Grenoble Engineering Center - France
Phone: +33 4 76 18 81 17
Email: Frederic.Parain at oracle.com
More information about the hotspot-runtime-dev
mailing list