Request for review: JDK-715889: Non-zero padding is still not allowed in the tableswitch/lookupswitch instructions

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Feb 22 12:51:17 PST 2013


On 2/22/13 5:00 AM, harold seigel wrote:
> Hi Vladimir,
>
> Thanks for your comments.
>
> I'll take a look at that code, but it needs to work with relaxed padding
> in order to be JVM spec compliant.

Correct and you need to fix it if it does not work. And I think it does 
not work because Hotspot always relied on fact that they are aligned. 
Look on Bytecode_lookupswitch and Bytecode_tableswitch classes in C++ 
interpreter (bytecode.?pp).

Vladimir

>
> Harold
>
> On 2/21/2013 6:18 PM, Vladimir Kozlov wrote:
>> Harold,
>>
>> What about code in runtime/relocator.cpp ? Also
>> TemplateTable::*switch() in templateTable_<arch>.?pp and other places
>> where we process switches? Will they work if we relax padding?
>>
>> Thanks,
>> Vladimir
>>
>> On 2/21/13 12:25 PM, harold seigel wrote:
>>> Hi,
>>>
>>> Please review the following change to fix bug 7154889.
>>>
>>> Summary:
>>> The JVM spec was changed to allow nonzero padding bytes for
>>> lookupswitch/tableswitch bytecodes.  This fix implements this change by
>>> suppressing the check for non-zero padding bytecodes for classfile
>>> versions 51 and higher.  This fix is implemented in both verifiers.
>>> Hence, there are two webrevs.
>>>
>>> The fix was tested with the JCK vm and lang tests and with a test that
>>> had nonzero padding bytes in classes with classfile versions 50, 51, and
>>> 52.
>>>
>>> Open webrevs at:
>>> http://cr.openjdk.java.net/~hseigel/bug_7154889_split_vfr/
>>> <http://cr.openjdk.java.net/%7Ehseigel/bug_7154889_split_vfr/>
>>> http://cr.openjdk.java.net/~hseigel/bug_7154889_old_vfr/
>>> <http://cr.openjdk.java.net/%7Ehseigel/bug_7154889_old_vfr/>
>>>
>>> Bug link at http://bugs.sun.com/view_bug.do?bug_id=7154889
>>>
>>> Thanks!  Harold
>


More information about the hotspot-runtime-dev mailing list