JDK 9 RFR and sponsorship of JDK-8030656 Bad version check for parameter information in src/share/vm/classfile/javaClasses.cpp

Joe Darcy joe.darcy at oracle.com
Wed Dec 18 23:52:46 PST 2013


Hi David,

On 12/18/2013 11:45 PM, David Holmes wrote:
> On 19/12/2013 5:12 AM, Christian Thalinger wrote:
>>
>> On Dec 18, 2013, at 10:33 AM, Joe Darcy <joe.darcy at oracle.com> wrote:
>>
>>> Hello,
>>>
>>> During the course of trying to increment the JDK_MINOR_VERSION from 
>>> 8 to 9 in the JDK 9 forest, a HotSpot bug has discovered:
>>>
>>>         JDK-8030656 Bad version check for parameter information in 
>>> src/share/vm/classfile/javaClasses.cpp
>>>
>>> Fortunately, the fix is very simple:
>>>
>>> --- a/src/share/vm/classfile/javaClasses.cpp    Fri Dec 13 09:35:12 
>>> 2013 -0800
>>> +++ b/src/share/vm/classfile/javaClasses.cpp    Wed Dec 18 10:30:02 
>>> 2013 -0800
>>> @@ -3286,7 +3286,7 @@
>>>      sun_reflect_ConstantPool::compute_offsets();
>>> sun_reflect_UnsafeStaticFieldAccessorImpl::compute_offsets();
>>>    }
>>> -  if (JDK_Version::is_jdk18x_version())
>>> +  if (JDK_Version::is_gte_jdk18x_version())
>>
>> Shouldn’t code like this be removed at all now that HSX is dead?
>
> Eventually, maybe, perhaps :) But lets make life simple for Joe :)
>
> While there is an argument for removing the version checks (and there 
> are a number of them) now that the version is essentially fixed for a 
> given copy of the file, there is some documentation value in knowing 
> which features are new (yes this can be handled by comments) and it 
> may also aid in ease of backports.
>
> The hotspot folk should make a decision as to how to handle this 
> consistently and then implement that. Once we can let go of the past 
> there is a lot of cleanup possible. Though I have also heard a 
> counter-argument that this makes it harder for other OpenJDK users to 
> try to retrofit new Java 8 features into OpenJDK 7.
>
>>> java_lang_reflect_Parameter::compute_offsets();
>>>
>>>    // generated interpreter code wants to know about the offsets we 
>>> just computed:
>>>
>>> With this patch, the java.lang.reflect.Parameter related tests that 
>>> fail in the jdk and langtools repos pass.
>>>
>>> I'm requesting review of and sponsorship of this fix for JDK 9.
>
> Joe I am fine with the fix. Do you still need a sponsor? I'm not sure 
> if we have JPRT in a position where pushes to the jdk9 repos is 
> possible yet.
>

Thanks for offering to sponsor; off-list, Eric McCorkle offered to help 
out there.

Cheers,

-Joe


More information about the hotspot-dev mailing list