Integrated: 8255466: C2 crashes at ciObject::get_oop() const+0x0

Vladimir Kozlov kvn at openjdk.java.net
Thu Oct 29 22:40:48 UTC 2020


On Wed, 28 Oct 2020 02:19:42 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Graal testing hit this issue with product VM. Tom R. suggested that it could be the case of reflective unsafe static field access that would eventually be optimized away because the Class is null:
> `if (staticFieldBase != null) {
>   return Unsafe.getInt(staticFieldBase, Unsafe.staticFieldOffset(field));
> }`
> 
> I suggest to replace assert with runtime check. Note, `o` value is assigned to `_const_oop` so semantically new code is the same except additional runtime check.
> 
> I also noticed that const_oop is accessed without check for NULL in new Vector API code. I added check there too.
> 
> Passed tier1-3 testing.

This pull request has now been integrated.

Changeset: 56eb5f54
Author:    Vladimir Kozlov <kvn at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/56eb5f54
Stats:     71 lines in 3 files changed: 67 ins; 0 del; 4 mod

8255466: C2 crashes at ciObject::get_oop() const+0x0

Reviewed-by: vlivanov

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

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


More information about the hotspot-compiler-dev mailing list