RFR(XS): JDK-8040018 Remove bad assert in ClassFileParser.cpp

Lois Foltan lois.foltan at oracle.com
Thu Apr 17 21:34:27 UTC 2014


Hi Harold,

Just a follow up.  After looking at this more today, I actually think my 
ASM test case isn't working as intended.  I think you are better off 
going with the original .jcod/test.jar file for testing. As I mentioned 
below, the code change looks good.

Lois

On 4/16/2014 7:46 PM, Lois Foltan wrote:
> Hi Harold,
>
> Overall I think the change to classFileParser.cpp looks good.  My only 
> comments are about the test case, ClassFileParserBug.java.  I 
> personally find the readability of the .jcod file cumbersome.  I have 
> attached a ASM file, TestBadBootstrapMethodsAttr.java, in case you 
> would prefer a straight java file.  It needs to be cleaned up before 
> it can be checked into the test system, but it does demonstrate the 
> issue.  Also, is it possible to have the test case live in 
> test/runtime/verifier instead of a new directory?
>
> If you feel that the .jcod file and test.jar file better exercise this 
> class format issue, then by all means you have my review to go forward.
>
> Thanks,
> Lois
>
>
> On 4/16/2014 1:49 PM, harold seigel wrote:
>> Hi,
>>
>> Please review this small change to fix bug JDK-8040018 for JDK-9. The 
>> fix removes the assert because it can be triggered by a class file 
>> containing an incorrect attribute_length value for the 
>> BoostrapMethods attribute, not just by a JVM inconsistency. Removing 
>> the assert lets the following guarantee_property() call catch the 
>> problem and throw a java.lang.ClassFormatError exception.
>>
>> The fix was tested with JPRT, JCK lang, JCK vm, hotspot jtreg, and 
>> nsk quick tests.  The new test was tested on Linux and Windows.
>>
>> Open webrev at: http://cr.openjdk.java.net/~hseigel/bug_8040018/ 
>> <http://cr.openjdk.java.net/%7Ehseigel/bug_8040018/>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8040018
>>
>> Thanks! Harold
>



More information about the hotspot-runtime-dev mailing list