日常之过时bug(java.lang.ClassFormatError: StackMapTable format error)
简述
一时心血来潮,想编译个OpenJDK,遇到了几个编译错误,这很常见。但有个错误,比较奇怪。
过程
报错如下,简单排查没有头绪。
> java -Xms64M -Xmx1600M -cp ... --add-exports ... build.tools.jigsaw.AddPackagesAttribute java-home
< 错误: 无法初始化主类 build.tools.jigsaw.AddPackagesAttribute
< 原因: java.lang.ClassFormatError: StackMapTable format error: access beyond the end of attribute
一番摸索,找到几个线索。
- homebrew/commit/openjdk@21: build with llvm to work around failure on Sequoia
- homebrew/issues/First issues in testing formula builds on Sequoia
- JDK-8340341: Abort in configure when using Xcode 16.0 or 16.1
- developer.apple.com / XCode 16 clang++ compiler generates unexpected results
This is fixed in Xcode 16.2 beta 3 (clang-1600.0.26.6).
去升级!
结论
为保障稳定,请及时升级。(大误
更多
使用 Xcode 16.3 仍要打 patch。

浙公网安备 33010602011771号