IncompatibleClassChangeError bug

forax at univ-mlv.fr forax at univ-mlv.fr
Wed Jul 18 20:52:09 UTC 2018


Ok, great,
i see the bug in the code, it inserts the name of the array instead of inserting the component type name.

regards,
Rémi

----- Mail original -----
> De: "mandy chung" <mandy.chung at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "valhalla-dev" <valhalla-dev at openjdk.java.net>
> Envoyé: Mercredi 18 Juillet 2018 22:48:49
> Objet: Re: IncompatibleClassChangeError bug

> 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> 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