RFR 9: 8139390 : Very long classname in jimage causes SIGSEGV

Mandy Chung mandy.chung at oracle.com
Thu Oct 29 18:59:47 UTC 2015


> On Oct 27, 2015, at 11:40 PM, Roger Riggs <roger.riggs at oracle.com> wrote:
> 
> Please review an update to the jimage reader implementation to correct the
> case where a class name is very long causing a SEGV due to buffer overruns.
> 
> The fix will be pushed to the hs-comp repo; the bug was first spotted there.

I suggest to push it to jdk9/dev and that will be pulled into hs-comp when it’s sync’ed up. 

> 
> Webrev:
>   http://cr.openjdk.java.net/~rriggs//webrev-jimage-segv-8139390

Looks okay in general.  

ImageNativeSubstrate.cpp
    Is this native JIMAGE_FindResource method intended for tests to use?  I don’t find any reference to it besides tests.  The other option is to have a java method checking null parameters and call this native method (and make this native method private).

test/jdk/internal/jimage/JImageReadTest.java
169         Assert.assertTrue(max > 16000,
170                 "missing entries, should be more than 31000, reported: " + count);

Is the change from 31000 to 16000 accidental?

This is unrelated to your change and just to mention it.  The test hardcodes 9.0 as the version and the hardcoded value should be replaced for future release.   Probably best to file a JBS issue for that.

Mandy


More information about the jigsaw-dev mailing list