编译失败:D8: Invalid stack map table at instruction 405
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- backend, build-system
调研方向
Start with the supplied demo branch at commit bc31ff2 and reproduce the failure with ./gradlew :test-none-dynamic-host:assembleDebug. Inspect the D8 stack map errors in the listed Tencent Kona security classes and compare with the attempted fix from issue #1196 and commit 9ca4121. Done means identifying the cause and a fix that lets the assembly complete without these D8 errors.
由索引模型根据 Issue 内容生成。
描述
执行:./gradlew :test-none-dynamic-host:assembleDebug 任务时,编译失败
报错日志如下:
Task :test-plugin-general-cases:dexBuilderPluginDebug
WARNING:/Shadow/projects/test/plugin/general-cases/test-plugin-general-cases/build/intermediates/transforms/ShadowTransform/plugin/debug/83.jar: D8: Invalid stack map table at instruction 405: invokespecial javax.crypto.spec.IvParameterSpec.([BII)V, error: Could not assign '{0:Initialized(javax.crypto.spec.SecretKeySpec),1:Initialized(byte[]),2:Initialized(javax.crypto.spec.SecretKeySpec),3:int,4:Initialized(javax.crypto.spec.SecretKeySpec),5:Initialized(javax.crypto.spec.SecretKeySpec),6:Initialized(javax.crypto.spec.IvParameterSpec),7:uninitialized new,8:Initialized(java.lang.String),9:int,10:Initialized(byte[]),11:int,12:int,13:Initialized(byte[]),14:Initialized(java.security.MessageDigest),15:Initialized(java.security.MessageDigest)}' to '{0:oneword,1:Initialized(byte[]),2:Initialized(java.lang.Object),3:oneword,4:Initialized(javax.crypto.spec.SecretKeySpec),5:Initialized(javax.crypto.spec.SecretKeySpec),6:oneword,7:Initialized(javax.crypto.spec.IvParameterSpec),8:Initialized(java.lang.String),9:oneword,10:Initialized(byte[]),11:oneword,12:int,13:Initialized(byte[]),14:Initialized(java.security.MessageDigest),15:Initialized(java.security.MessageDigest)}'. The local at index 7 with 'uninitialized new' not being assignable to 'Initialized(javax.crypto.spec.IvParameterSpec)'.
WARNING:/Shadow/projects/test/plugin/general-cases/test-plugin-general-cases/build/intermediates/transforms/ShadowTransform/plugin/debug/83.jar: D8: Invalid stack map table at instruction 111: invokespecial java.util.Hashtable.(I)V, error: Could not assign '{0:Initialized(com.tencent.kona.sun.security.provider.JavaKeyStore),1:int,2:Initialized(char[]),3:Initialized(java.util.Hashtable),4:Initialized(java.security.MessageDigest),5:null,6:uninitialized new,7:int,8:int,9:Initialized(java.io.DataInputStream)}' to '{0:Initialized(java.lang.Object),1:oneword,2:Initialized(char[]),3:Initialized(java.util.Hashtable),4:Initialized(java.security.MessageDigest),5:Initialized(java.lang.Object),6:Initialized(java.util.Hashtable),7:int,8:int}'. The local at index 6 with 'uninitialized new' not being assignable to 'Initialized(java.util.Hashtable)'.
....
ERROR:/Shadow/projects/test/plugin/androidx-cases/test-plugin-androidx-cases/build/intermediates/transforms/ShadowTransform/plugin/debug/0.jar: D8: java.lang.NullPointerException: Cannot read field "d" because "" is null
.....
请问这个原因是什么导致的呢?似乎是引入的 SDK(AAR 文件中)包含了一些 class 字节码格式不合法或不兼容 D8 的类?尤其是下面这些类异常频繁:
com.tencent.kona.sun.security.ssl.SSLSessionImpl
com.tencent.kona.sun.security.ssl.HandshakeContext
com.tencent.kona.sun.security.ssl.CertStatusExtension
com.tencent.kona.sun.security.util.ObjectIdentifier
javax.crypto.spec.IvParameterSpec
我尝试了使用该issue#1196的解决方案,使用提交9ca4121的方法,但并没有解决该问题。
@shifujun
附测试demo:https://github.com/VayneXPP/Shadow/tree/issue-Invalid-stack-map-table
提交:bc31ff2
- 主要语言
- Java
- 星标
- 7.8k
- 派生
- 1.3k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Tencent/Shadow 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
有AGP9的支持计划吗未关闭
难度 4/5 3-5 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 1/5 1 小时以内 新手友好度 35/100
-
AGP 9支持有计划吗?未关闭
难度 5/5 一周以上 新手友好度 15/100
相似的 Issue
-
area:cpan-port area:performance bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#2230 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 82/100
federicoiosue/Omni-Notes#1044 ·
-
Bug
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复