-
Bug
-
Resolution: Fixed
-
P4
-
8-aarch64, 11, 14, 15
AArch64 C2 shows an internal error of "bad AD file" with vm option "-XX:-UsePopCountInstruction" specified. This can be reproduced with below program.
public class Foo {
private static int bar(int x) {
return Integer.bitCount(x);
}
public static void main(String[] args) {
int sum = 0;
for (int i = 0; i < 30000; i++) {
sum += bar(i);
}
System.out.println(sum);
}
}
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/penli01/jdk_src/src/hotspot/share/opto/matcher.cpp:1563), pid=67629, tid=67650
# assert(false) failed: bad AD file
#
# JRE version: OpenJDK Runtime Environment (15.0) (fastdebug build 15-internal+0-adhoc.penli01.jdksrc)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 15-internal+0-adhoc.penli01.jdksrc, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x10484c8]219504
Matcher::Label_Root(Node const*, State*, Node*, Node const*)+0x6b0
public class Foo {
private static int bar(int x) {
return Integer.bitCount(x);
}
public static void main(String[] args) {
int sum = 0;
for (int i = 0; i < 30000; i++) {
sum += bar(i);
}
System.out.println(sum);
}
}
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/penli01/jdk_src/src/hotspot/share/opto/matcher.cpp:1563), pid=67629, tid=67650
# assert(false) failed: bad AD file
#
# JRE version: OpenJDK Runtime Environment (15.0) (fastdebug build 15-internal+0-adhoc.penli01.jdksrc)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 15-internal+0-adhoc.penli01.jdksrc, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x10484c8]219504
Matcher::Label_Root(Node const*, State*, Node*, Node const*)+0x6b0