The immediate cmp instruction has 12 significant bits. This causes an overflow in TestOptionsWithRanges.
For a fastdebug build openjdk in jdk10/hs tree:
{code:java}
$ ./images/jdk/bin/java -server -XX:+UseG1GC -XX:BlockZeroingLowLimit=2147483647 -version
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/macroAssembler_aarch64.cpp:2050
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/ninjia02/Work/jdk/jdk10/gerrit/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp:2050), pid=24153, tid=24154
# assert(Rd != zr) failed: overflow in immediate operand
#
# JRE version: (10.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 10-internal+0-adhoc.ninjia02.gerrit, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/ninjia02/jdk/jdk10/build-fastdebug/core.24153)
#
# An error report file with more information is saved as:
# /home/ninjia02/jdk/jdk10/build-fastdebug/hs_err_pid24153.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 24154
Dumping core ...
Aborted (core dumped)
{code}
For a fastdebug build openjdk in jdk10/hs tree:
{code:java}
$ ./images/jdk/bin/java -server -XX:+UseG1GC -XX:BlockZeroingLowLimit=2147483647 -version
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/macroAssembler_aarch64.cpp:2050
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/ninjia02/Work/jdk/jdk10/gerrit/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp:2050), pid=24153, tid=24154
# assert(Rd != zr) failed: overflow in immediate operand
#
# JRE version: (10.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 10-internal+0-adhoc.ninjia02.gerrit, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/ninjia02/jdk/jdk10/build-fastdebug/core.24153)
#
# An error report file with more information is saved as:
# /home/ninjia02/jdk/jdk10/build-fastdebug/hs_err_pid24153.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 24154
Dumping core ...
Aborted (core dumped)
{code}