jaotc fails to build the object file for the given class.

Tianxiao Gu tianxiao.gu at gmail.com
Sun Jan 21 01:34:59 UTC 2018


Hi All,

I have created a simple random Java class file generator and try to use it
to find bugs of JVM or dex compiler.

jaotc (jaotc 9.0.4+11) fails to build the object file for a generated class
with non-deterministic error messages.

I am not sure whether this is a bug or not since the generated class is
executable (ending with StackOverflowError) and also can be compiled by the
dex compiler for Android (dx).

Can anybody help me to resolve this issue?



OS (`uname -a`):

Linux xtiger 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


Reproduce:

./jdk-9.0.4/bin/jaotc --output C0.so C0.class


C0.class is attached.

One example of messages:

t@~/Projects/JVMTesting/bugs/t *>>> *../../jdk-9.0.4/bin/jaotc --output
> C0.so C0.class
> Error: Failed compilation:
> C0.M1([SLjava/lang/Double;[Ljava/lang/Short;[SLjava/lang/Integer;F[B[B[Ljava/lang/Float;Ljava/lang/Integer;[JLjava/lang/Double;IISS[JBLjava/lang/Object;[SLjava/lang/Character;Ljava/lang/Character;Ljava/lang/Short;[Ljava/lang/Character;[Z[Ljava/lang/Number;[Ljava/lang/Byte;FJ[I[CIIJLjava/lang/Float;[Ljava/lang/Byte;I[C[Ljava/lang/Integer;BB[Ljava/lang/Integer;[CLjava/lang/Double;[F[Ljava/lang/Double;Ljava/lang/Character;)B:
> java.lang.StackOverflowError
> Error: Failed compilation:
> C0.M3(FLjava/lang/Object;SB[Ljava/lang/Float;[Ljava/lang/CharSequence;[IJ[BLC0;CLjava/lang/Object;Ljava/lang/CharSequence;[ZLjava/lang/Number;ZCF[JLjava/lang/Character;[ZZ[Ljava/io/Serializable;LC0;[Ljava/lang/Integer;[Ljava/lang/String;FZFJZC[Ljava/lang/CharSequence;JI[LC0;CS[Ljava/io/Serializable;[BLjava/lang/Long;Ljava/lang/Short;[S[F[Ljava/lang/Float;[ILjava/lang/Integer;Ljava/lang/Long;[Ljava/lang/String;[IJ[Ljava/lang/Long;LC0;[BB[Ljava/lang/String;[Ljava/lang/String;[B[Ljava/lang/Double;Ljava/lang/Float;BFZLjava/lang/Short;[B[B[CLjava/lang/Number;Z[ZJ[I[LC0;B[ZFLjava/lang/String;I[Ljava/lang/String;[IF[BLjava/lang/CharSequence;C)I:
> java.lang.OutOfMemoryError: Java heap space
> Error: Failed compilation:
> C0.M8(Ljava/lang/Integer;[LC0;[Ljava/lang/Double;[ILjava/lang/Float;[Ljava/lang/Byte;[Ljava/lang/Character;BLjava/lang/Byte;Ljava/lang/Comparable;F[Ljava/lang/Object;[BLjava/lang/Character;C[I[Ljava/lang/String;ZLjava/lang/Long;JLjava/lang/Object;[Ljava/lang/CharSequence;FLjava/lang/Object;[Ljava/lang/Short;[I[Ljava/lang/Character;[BLjava/lang/Character;[Ljava/lang/Number;[Ljava/lang/Number;[ZLjava/lang/String;Ljava/lang/Short;)F:
> java.lang.OutOfMemoryError: Java heap space
> Error: Failed compilation:
> C0.M5(Z[S[Z[BLjava/lang/Double;[Ljava/lang/Integer;Ljava/lang/Short;[Ljava/lang/Integer;[F[I[F[Ljava/lang/Number;FLjava/lang/Float;)C:
> java.lang.OutOfMemoryError: Java heap space
> Error: Failed compilation: C0.main([Ljava/lang/String;)V: java.lang.OutOfMemoryError:
> Java heap space
> Error: Failed compilation:
> C0.M2([Ljava/lang/Number;CJLjava/lang/Character;Ljava/lang/Float;J[ISLjava/lang/Short;)F:
> java.lang.OutOfMemoryError: Java heap space


More information about the jdk9-dev mailing list