IncompatibleClassChangeError bug (original) (raw)

mandy chung mandy.chung at oracle.com
Wed Jul 18 20:48:49 UTC 2018


Hi Remi,

It's a bug in the InnerClassLambdaMetafactory including an array type in the ValueTypes attribute.

I fix it in the fix for JDK-8207790 [1]: http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8207790/webrev.00/

I verified your test that works.

Mandy [1] http://mail.openjdk.java.net/pipermail/valhalla-dev/2018-July/004730.html

On 7/18/18 1:39 PM, Remi Forax wrote:

Hi all, a build from 39a2d3a3b101 breaks my tests with an IncompatibleClassChangeError. I have isolated the issue:

--- import java.util.function.IntFunction; public class ArrayGeneratorBug { _static ByValue class Foo { private final int x; public Foo(int x) { this.x = x; } } private static T[] gen(IntFunction<T[]> arrayCreator) { return arrayCreator.apply(0); } public static void main(String[] args) { Foo[] array = gen(Foo[]::new); System.out.println(array); } } --- At runtime something goes wrong: /usr/jdk/jdk-11-lworld/bin/java -XX:+EnableValhalla ArrayGeneratorBug Exception in thread "main" java.lang.IncompatibleClassChangeError: signature (I)[LArrayGeneratorBug$Foo; inconsistent value type: ArrayGeneratorBug$$Lambda$1/0x0000000800060840 ArrayGeneratorBug at ArrayGeneratorBug.gen(ArrayGeneratorBug.java:14) at ArrayGeneratorBug.main(ArrayGeneratorBug.java:18) regards, Rémi



More information about the valhalla-dev mailing list