openjdk8 crash on aarch64; guarantee(val < (1U << nbits)) failed: Field too big for insn

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Thu, 27 Jan 2022 09:03:05 UTC
Hi,

A lot of java ports are failing in the build cluster since about a week (or two) on arm64.

Example output: http://ampere2.nyi.freebsd.org/data/main-arm64-default/pd8f8cc3a8823_s4f0e50b293/logs/errors/jacop-4.8.0.log (ipv6)

=======================<phase: build          >============================
===>  Building for jacop-4.8.0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (assembler_aarch64.hpp:237), pid=89536, tid=0x00000000000a9630
#  guarantee(val < (1U << nbits)) failed: Field too big for insn
#
# JRE version:  (8.0_312-b07) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.312-b07 mixed mode bsd-aarch64 compressed oops)
# Core dump written. Default location: /wrkdirs/usr/ports/math/jacop/work/jacop-4.8.0/java.core
#
# An error report file with more information is saved as:
# /wrkdirs/usr/ports/math/jacop/work/jacop-4.8.0/hs_err_pid89536.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26%20Packages&component=Individual%20Port(s)&short_desc=java/openjdk8%3A%20
#
*** Signal 6


I can reproduce this on my rpi4 and it is "fixed" if I compile openjdk8 using llvm12 from ports instead of llvm13 from base.
Is anybody looking into this? Should I file a PR?

Regards,
Ronald.