RFR: 8043275 8u40 backport: Interface initialization for default methods
Coleen Phillimore
coleen.phillimore at oracle.com
Fri Oct 24 19:28:01 UTC 2014
I have reviewed these changes and they look fine.
Coleen
On 10/24/14, 2:24 PM, Karen Kinnear wrote:
> Dan,
>
> Thank you again. Copying Coleen since the 8035132 fix was hers
>
> Yes, InvokespecialInterface.java fix was part of 8035132 which has a request on it to backport.
> I assumed you meant that backport should be done separately from this push so that folks
> tracking the backport would be clear.
>
> If I can do an hg commit with two bugids I can push that change to 8u40 as well, but
> I don't know if our tools will automatically update the 8035132 bug report or if we are
> better off leaving that change for a separate commit.
>
> I am also not backporting this change to any other version.
>
> Do you know what works best here?
>
> thanks,
> Karen
>
> On Oct 24, 2014, at 1:24 PM, Daniel D. Daugherty wrote:
>
>> On 10/24/14 11:17 AM, Daniel D. Daugherty wrote:
>>> This URL should work:
>>>
>>> http://cr.openjdk.java.net/~acorn/8043275.8u40.2/webrev/
>> src/share/vm/classfile/classFileParser.cpp
>> No comments.
>>
>> src/share/vm/classfile/classFileParser.hpp
>> No comments.
>>
>> src/share/vm/oops/instanceKlass.cpp
>> No comments.
>>
>> src/share/vm/oops/instanceKlass.hpp
>> No comments.
>>
>> test/runtime/lambda-features/InvokespecialInterface.java
>> Sorry, I didn't mean for you to back out this change:
>>
>> - * @run main/othervm -XX:+StressRewriter InvokespecialInterface
>> + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+StressRewriter InvokespecialInterface
>>
>> That change was not part of your JDK9 patch that bug had
>> been fixed in JDK9 before your changes. I think you do need
>> to make the above change for 8u40.
>>
>> test/runtime/lambda-features/TestInterfaceInit.java
>> No comments.
>>
>> test/runtime/lambda-features/TestInterfaceOrder.java
>> No comments.
>>
>> Dan
>>
>>
>>
>>> Dan
>>>
>>>
>>> On 10/24/14 11:05 AM, Karen Kinnear wrote:
>>>> Dan,
>>>>
>>>> Many many thanks - good catches!
>>>>
>>>> Updated webrev: http://cr.openjdk.java.net/~acorn/8043275.uu40.2/webrev
>>>>
>>>> thanks,
>>>> Karen
>>>>
>>>> On Oct 24, 2014, at 12:40 PM, Daniel D. Daugherty wrote:
>>>>
>>>>> On 10/24/14 10:06 AM, Karen Kinnear wrote:
>>>>>> Please review 8u40 backport:
>>>>>>
>>>>>> webrev: http://cr.openjdk.java.net/~acorn/8043275.8u40/webrev/
>>>>> I compared the JDK9-hs-rt version with the JDK8u40-hs version.
>>>>>
>>>>> src/share/vm/classfile/classFileParser.cpp
>>>>> No comments.
>>>>>
>>>>> src/share/vm/classfile/classFileParser.hpp
>>>>> No comments.
>>>>>
>>>>> src/share/vm/oops/instanceKlass.cpp
>>>>>
>>>>> 799 if (HAS_PENDING_EXCEPTION) {
>>>>> 800 Handle e(THREAD, PENDING_EXCEPTION);
>>>>> 801 CLEAR_PENDING_EXCEPTION;
>>>>> 802 {
>>>>> 803 EXCEPTION_MARK;
>>>>> 804 // Locks object, set state, and notify all waiting threads
>>>>> 805 this_oop->set_initialization_state_and_notify(
>>>>> 806 initialization_error, THREAD);
>>>>> 807
>>>>> 808 // ignore any exception thrown, superclass initialization error is
>>>>> 809 // thrown below
>>>>> 810 CLEAR_PENDING_EXCEPTION;
>>>>> 811 }
>>>>> 812 }
>>>>>
>>>>> The JDK9 version has this between lines 811 and 812:
>>>>>
>>>>> THROW_OOP(e());
>>>>>
>>>>> Is there reason for the difference?
>>>> Bad manual merge
>>>>> src/share/vm/oops/instanceKlass.hpp
>>>>> No comments.
>>>>>
>>>>> src/share/vm/utilities/dtrace_disabled.hpp
>>>>> The JDK9 patch modified this file, but the file doesn't
>>>>> exist in JDK8u40-hs.
>>>> That was a comment spelling fix - I was in there for another reason which
>>>> I ended up not needing. Change isn't needed in 8u40.
>>>>> test/runtime/lambda-features/InvokespecialInterface.java
>>>>> The @run changes already existed in JDK9 before your patch.
>>>> I undid those
>>>>> test/runtime/lambda-features/TestInterfaceInit.java
>>>>>
>>>>> The second line has a blank at the end of it:
>>>>>
>>>>> + public static void main(String[] args) {
>>>>> + // Trigger initialization
>>>> Fixed
>>>>> test/runtime/lambda-features/TestInterfaceOrder.java
>>>>> No comments.
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8043275
>>>>>>
>>>>>> Summary:
>>>>>> Fix superinterface initialization to be based on declaring a non-static instance method rather than
>>>>>> on declaring or inheriting one
>>>>>>
>>>>>> Tested (linux-x64) 8u40:
>>>>>> jtreg hotspot lambda-features which includes the two new tests: TestInterfaceInit and TestInterfaceOrder
>>>>>> InvokespecialInterface was changed to use nested classes so there is no name conflict for C.class in that directory
>>>>>>
>>>>>> thanks,
>>>>>> Karen
More information about the hotspot-dev
mailing list