如何解决编译jdk12出现的错误 BitMap index out of bounds?

我在编译jdk12出现以下错误

Current thread is 49495

Dumping core ...

/usr/bin/bash: line 1: 49485 Aborted (core dumped) /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/jdk/bin/java -Xms64M -Xmx1600M -XX:ThreadStackSize=1536 -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 -cp /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/buildtools/tools_jigsaw_classes --add-exports java.base/jdk.internal.module=ALL-UNNAMED build.tools.jigsaw.AddPackagesAttribute /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/jdk > >(/usr/bin/tee -a /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/jdk/_packages_attribute.done.log) 2> >(/usr/bin/tee -a /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/jdk/_packages_attribute.done.log >&2)

gmake[3]: *** [ExplodedImageOptimize.gmk:41: /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/jdk/_packages_attribute.done] Error 134

gmake[2]: *** [make/Main.gmk:372: exploded-image-optimize] Error 2

ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-fastdebug' (exit code 2)

Stopping sjavac server

=== Output from failing command(s) repeated here ===

* For target jdk__packages_attribute.done:

# To suppress the following error report, specify this argument

# after -XX: or in .hotspotrc: SuppressErrorAt=/bitMap.cpp:178

#

# A fatal error has been detected by the Java Runtime Environment:

#

# Internal Error (/home/lx/my_jdk/jdk-jdk-12-ga/src/hotspot/share/utilities/bitMap.cpp:178), pid=49485, tid=49495

# assert(index < _size) failed: BitMap index out of bounds

#

# JRE version: OpenJDK Runtime Environment (12.0) (fastdebug build 12-internal+0-adhoc.lx.jdk-jdk-12-ga)

# Java VM: OpenJDK 64-Bit Server VM (fastdebug 12-internal+0-adhoc.lx.jdk-jdk-12-ga, mixed mode, tiered, compressed oops, serial gc, linux-amd64)

# Problematic frame:

# V [libjvm.so+0x7507cb] BitMap::verify_index(unsigned long) const+0x2b

... (rest of output omitted)

* All command lines available in /home/lx/my_jdk/jdk-jdk-12-ga/build/linux-x86_64-server-fastdebug/make-support/failure-logs.

=== End of repeated output ===

No indication of failed target found.

Hint: Try searching the build log for '] Error'.

Hint: See doc/building.html#troubleshooting for assistance.

make[1]: *** [/home/lx/my_jdk/jdk-jdk-12-ga/make/Init.gmk:310: main] Error 2

make: *** [/home/lx/my_jdk/jdk-jdk-12-ga/make/Init.gmk:186: images] Error 2

我使用的环境:
virtualBox 7.0、Ubuntu server 22.04、openjdk 11
虚拟机内存10g


回答:

报错是bitMap.cpp有问题,可以跟着官方文档检查下编译环境,gcc版本一类的
12应该是19年发布的,还是short term的,22年的ubuntu不一定全支持,可能需要降版本

以上是 如何解决编译jdk12出现的错误 BitMap index out of bounds? 的全部内容, 来源链接: utcz.com/p/945204.html

回到顶部