Compiler bugs

Remi Forax forax at univ-mlv.fr
Mon Mar 4 15:45:19 UTC 2024


----- Original Message -----
> From: "cay horstmann" <cay.horstmann at gmail.com>
> To: "Valhalla Expert Group Observers" <valhalla-spec-observers at openjdk.org>
> Sent: Monday, March 4, 2024 4:35:17 PM
> Subject: Compiler bugs

> Hi, 

Hello,

> I built the Valhalla image from https://github.com/openjdk/valhalla and get
> errors with very basic programs:
> 
> import java.lang.management.*;
> 
> value record Point(int x, int y) {}
> 
> public class Problem1 {
>    public static void main(String[] args) {
>       int NPOINTS = 100_000;
>       System.out.println(new Point(3, 4));
>    }
> }
> 
> $ javac Problem1.java
> $ java Problem1
> Exception in thread "main" java.lang.IncompatibleClassChangeError: Value type
> Point has an identity type as supertype
> 
> value class Point {
>    int x;
>    int y;
>    Point(int x, int y) { this.x = x; this.y = y; }
> }
> 
> public class Problem2 {
>    public static void main(String[] args) {
>       int NPOINTS = 100_000;
>       Point[] ps = new Point[NPOINTS];
>       for (int i = 0; i < ps.length; i++) {
>          ps[i] = new Point(i, i);
>       }
>    }
> }
> 
> #  SIGSEGV (0xb) at pc=0x00007f27b82c9570, pid=111935, tid=111936
> #
> # JRE version: OpenJDK Runtime Environment (22.0) (build
> 22-internal-adhoc.cay.valhalla)
> # Java VM: OpenJDK 64-Bit Server VM (22-internal-adhoc.cay.valhalla, mixed mode,
> sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # J 6 c2 Point.<init>(II)V (15 bytes) @ 0x00007f27b82c9570
> [0x00007f27b82c94a0+0x00000000000000d0]
> #
> 
> Are you interested in getting such reports, or is the implementation known to be
> unstable right now?

The implementation is unstable right now
https://mail.openjdk.org/pipermail/valhalla-dev/2024-February/012042.html

Also, wrong list, it should be valhalla-dev given that it's an implementation issue.

> 
> Cheers,
> 
> Cay
> 

regards,
Rémi

> 
> --
> 
> Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com


More information about the valhalla-spec-observers mailing list