[9] RFR (S): 8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Oct 29 15:31:24 UTC 2014


The suggested fix seems correct.

Klass* holder; - initialize to NULL.

// since cached elements are never removed during ciObjectFactory lifetime.

Please, clarify in the comment that ciObjectFactory is created per compilation and lives only during it.

Thanks,
Vladimir

On 10/29/14 6:57 AM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8060147/webrev.00
> https://bugs.openjdk.java.net/browse/JDK-8060147
>
> ciObjectFactory doesn't keep cached Metadata* alive. ciMetadata is different from ciObject - it doesn't store JNI
> handle, but a raw Metadata* pointer.
>
> In order to avoid Metadata* vanishing during compilation, I cache ciObject for it's holder, which should keep
> corresponding Metadata* alive. Cached objects have the same lifetime as the owning ciObjectFactory (no cache pruning),
> so Metadata* will be available as long as ciObjectFactory instance is used.
>
> Also, cleaned relevant comments and strengthened some asserts (since NULL keys are not allowed).
>
> Testing: jprt, stress mode - full Nashorn/Octane with aggressive VM anonymous class unloading (LambdaForm/MethodHandle
> caching completely turned off).
>
> Thanks!
>
> Best regards,
> Vladimir Ivanov


More information about the hotspot-compiler-dev mailing list