RFR: 8255466: C2 crashes at ciObject::get_oop() const+0x0
Vladimir Kozlov
kvn at openjdk.java.net
Wed Oct 28 02:25:25 UTC 2020
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.
-------------
Commit messages:
- 8255466: C2 crashes at ciObject::get_oop() const+0x0
Changes: https://git.openjdk.java.net/jdk/pull/890/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=890&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8255466
Stats: 9 lines in 2 files changed: 5 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/890.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/890/head:pull/890
PR: https://git.openjdk.java.net/jdk/pull/890
More information about the hotspot-compiler-dev
mailing list