Request for review: JDK-715889: Non-zero padding is still not allowed in the tableswitch/lookupswitch instructions
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++
> On 2/21/2013 6:18 PM, Vladimir Kozlov wrote:
>> 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?
>> On 2/21/13 12:25 PM, harold seigel wrote:
>>> Please review the following change to fix bug 7154889.
>>> 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
>>> Open webrevs at:
>>> Bug link at http://bugs.sun.com/view_bug.do?bug_id=7154889
>>> Thanks! Harold
More information about the hotspot-runtime-dev