8226389 [asm] : jlink tests fail; asm has wrong understanding of new bytecodes

Roger Riggs Roger.Riggs at oracle.com
Fri Jun 21 14:40:19 UTC 2019


Hi Mandy,

An ASM test would be more appropriate;  jlink itself doesn't much care 
about the classes.
The particular test that was failing was one of the Strip debug tests.

Where are the ASM tests?

Thanks, Roger


On 6/20/19 7:24 PM, Mandy Chung wrote:
> I assume you run into the jlink issues with JDK using the inline class.
> It's good to add a new test that creates a module with inline class
> and invoke jlink to produce an image.
>
> Mandy
>
> On 6/20/19 11:34 AM, Roger Riggs wrote:
>> Hi,
>>
>> I discovered that the visiting of the new opcodes was not correct. It 
>> skipped over them correctly
>> but did not visit each opcode.
>> The 'default' opcode argument is a type name and so should call the 
>> visitTypeInsn method.
>> The "withfield' opcode argument is a field ref (class and name) so 
>> should call visitFieldInsn.
>> And the INLINE prefixes are dropped.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-asm-8226389-4/index.html
>>
>> Thanks, Roger
>>
>>
>> On 6/20/19 1:38 PM, Mandy Chung wrote:
>>> Looks okay.  The INLINE_* prefix is not necessary to me and matching
>>> the JVMS opcode names makes sense.
>>>
>>> Mandy
>>>
>>>
>>> On 6/19/19 10:57 AM, Roger Riggs wrote:
>>>> Hi Mandy,
>>>>
>>>> Webrev:
>>>> http://cr.openjdk.java.net/~rriggs/webrev-asm-8226389-2/
>>>>
>>>> A more robust version that computes the necessary offsets of the 
>>>> ASM_ opcodes
>>>> to relocate them to the unused indexes above the new WithField opcode.
>>>>
>>>> Thanks, Roger
>>>>
>>>>
>>>> On 6/19/19 12:22 PM, Mandy Chung wrote:
>>>>>
>>>>>
>>>>> On 6/19/19 7:47 AM, Roger Riggs wrote:
>>>>>> Please review a patch to asm to correctly recognize the Valhalla 
>>>>>> defined bytecodes for defaultvalue and withfield.
>>>>>> (The jlink tests that read and write classfiles were failing).
>>>>>>
>>>>>> Webrev:
>>>>>> http://cr.openjdk.java.net/~rriggs/webrev-asm-8226389/
>>>>>
>>>>> Label::resolve method depends on the assumption that IFEQ ... JSR 
>>>>> can be changed to ASM_IFEQ to ASM_JSR.   It seems that the 
>>>>> xxx_DELTA  needs to be adjusted.
>>>>>
>>>>> Mandy
>>>>
>>>
>>
>




More information about the valhalla-dev mailing list