Build failure on Fedora 28

Severin Gehwolf sgehwolf at redhat.com
Tue May 15 14:07:15 UTC 2018


Hi,

On Fri, 2018-05-11 at 12:55 +0900, Yasumasa Suenaga wrote:
> Hi,
> 
> I found 1 GCC optimization issue, but it is not enough.
> 
> http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/gdb-before.txt
> 
> I traced class loading from `modules`. Above log is copy of GDB
> console in ImageFileReader::verify_location().
> The code expects `*next++` increments after referring the value, but
> it do not so.
> 
> Thus I fixed the code as following changeset:
>   http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/wip.00/
> 
> It passes module name check, but it fails parent (package name) check.
> GDB log is here:
>   http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/gdb-after.txt
> 
> I guess the value of parent should be `java/lang`, but it sets to
> `sun/refrect/generics/factory`.
> Do you have anything to think about?

The problematic library was indeed libjimage.so. More below.

> 2018-05-09 17:22 GMT+09:00 Severin Gehwolf <sgehwolf at redhat.com>:
> > Hi,
> > 
> > Note that slowdebug builds work:
> > 
> > $ ./build/linux-x86_64-normal-server-slowdebug/images/jdk/bin/java -version
> > openjdk version "11-internal" 2018-09-25
> > OpenJDK Runtime Environment (slowdebug build 11-internal+0-adhoc.sgehwolf.openjdk-hs)
> > OpenJDK 64-Bit Server VM (slowdebug build 11-internal+0-adhoc.sgehwolf.openjdk-hs, mixed mode)
> > 
> > In summary we have:
> > 
> >  * Build fails with fastdebug/release debug config (-O3)
> >  * Build succeeds with slowdebug (-O0)
> >  * F28 has GCC 8
> >  * Older GCC-based builds continue to work for fastdebug/release config
> > 
> >  * JDK 10.0.1 builds fine with GCC 8.
> > 
> > So far showing all symptoms of either a GCC bug or some UB in recent
> > OpenJDK code which breaks with new optimizations done in GCC 8.
> > 
> > I'll continue to investigate what it is...

Looks like another case of UB in the JDK. This time libjimage.so with a
signed integer overflow:

https://bugs.openjdk.java.net/browse/JDK-8203223

Thanks,
Severin



More information about the build-dev mailing list