[15] RFR(M) 8237497: vmStructs_jvmci.cpp does not check that the correct field type is specified
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Mar 20 17:01:45 UTC 2020
http://cr.openjdk.java.net/~kvn/8237497/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8237497
JVMCI missed checks for declarations in vmStructs_jvmci.cpp. I copied check logic from vmStruct to fix that. It will be
called during JVMCI initialization in debug build (as for vmStruct). I can't call it from vmStructs_init() because
vmStruct code is guarded by INCLUDE_VM_STRUCTS variable which can be switched off with configure option
--with-jvm-features=-vm-structs. On other hand JVMCIVMStruct have to be initialized always when JVMCI is used - it is
how Graal accesses HotSpot's internal data.
The fix found several (4) cases of incorrect types in JVMCI declarations. 2 of them require update Graal code as well
which I will upstream later.
I also did cleanup in both, vmStructs_jvmci and vmStructs.
In vmStructs_jvmci I removed macros which are not used (we can add them back if they needed).
In vmStructs I moved all check code under #ifdef ASSERT because it is called only in debug build.
I removed VMStructs::test() declaration which we forgot to remove when its body was removed in JDK-8171090.
I removed duplicated lines which existed from "day one" (before Mercurial).
I did local build and testing with and without --with-jvm-features=-vm-structs to make sure everything (inluding Graal)
worked. I ran tier1 (which runs HotSpot gtests), hs-tier2, hs-tier3-graal.
Thanks,
Vladimir
More information about the hotspot-compiler-dev
mailing list