[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-graal-dev
Subject:    [15] RFR(M) 8237497: vmStructs_jvmci.cpp does not check that the correct field type is specified
From:       Vladimir Kozlov <vladimir.kozlov () oracle ! com>
Date:       2020-03-20 17:01:45
Message-ID: 64e0f4db-7e5f-039a-84a7-b014d1a523f2 () oracle ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic