Please, review a fix for: https://bugs.openjdk.java.net/browse/JDK-8080406 Webrev: http://cr.openjdk.java.net/~sspitsyn/webrevs/2018/8080406-jvmti-get-local.1/ Summary: The JVMTI GetLocal<Type>/SetLocal<Type> implementation type checking is based on LVT (Local Variable Table) content. But there is almost no type check if LVT is not present in class file. This fix is an attempt to fill in the gap. When LVT is absent, one issue is that just 3 types are available in the StackValueCollectionfor locals at runtime: - T_OBJECT: if local is an object - T_INT: if local is a primitive type - T_CONFLICT: if local is not valid at current location So there is no way to distinguish primitive types unless the requested type occupies two slots and actual second slot is not T_INT or is out of locals area. Testing: Tested locally on Linux-x64 with: - 1 new jtreg test: hotspot/jtreg/serviceability/jvmti/GetLocalVariable - 2 nsk jtreg tests: hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable - 2 nsk jtreg tests: hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariable - 4 nsk jtreg tests: hotspot/jtreg/vmTestbase/nsk/jvmti/SetLocalVariable In progress: The same as above but with mach5 in different configs. Thanks, Serguei |
- RFR (M) 8080406: VM_GetOrSetLocal doesn't check... serguei.spit...@oracle.com
- Re: RFR (M) 8080406: VM_GetOrSetLocal does... serguei . spitsyn
- Re: RFR (M) 8080406: VM_GetOrSetLocal ... serguei.spit...@oracle.com
- Re: RFR (M) 8080406: VM_GetOrSetLo... serguei.spit...@oracle.com
- Re: RFR (M) 8080406: VM_GetOrSetLo... Chris Plummer
- Re: RFR (M) 8080406: VM_GetOrS... serguei.spit...@oracle.com
- Re: RFR (M) 8080406: VM_G... serguei.spit...@oracle.com
- Re: RFR (M) 8080406: ... serguei.spit...@oracle.com