已关闭
[Bug]: AOT profile save may crash on large data #11785
zhangrunze创建于 6月4日关闭于 6月11日
openharmony_ci
6月4日 评论:
6月4日 评论:
感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@weng-changcheng](https://gitcode.com/weng-changcheng) [@godmiaozi](https://gitcode.com/godmiaozi) [@liyiming13](https://gitcode.com/liyiming13) [@lijin1039](https://gitcode.com/lijin1039) [@Prof](https://gitcode.com/Prof) [@dingding5](https://gitcode.com/dingding5) [@vpukhov](https://gitcode.com/vpukhov) [@v-cherkashin](https://gitcode.com/v-cherkashin) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。
Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.


6月4日 添加了label:waiting_for_assign
6月4日 关联了pull request:Limit AOT profile save size
6月11日 关闭了 issue
6月11日 issue状态由 待办的 改变为 已完成
6月17日 关联了pull request:Limit AOT profile save size
感谢对OpenHarmony社区的支持与关注,欢迎反馈缺陷。
发生了什么问题?
AOT profile 落盘时,如果 profile 数据过大,Buffer 构造路径可能触发 LOG(FATAL),导致进程崩溃。同时 branch profile 在未开启落盘需求时也可能被写入 ap,放大文件体积。
When AOT profile data is too large, the profile save path may hit LOG(FATAL) during Buffer allocation and crash the process. Branch profile data may also be persisted when it is not intended, increasing the AP file size.
期望行为是什么?
当 AOT profile 数据超过大小上限时,应跳过本次落盘并保留旧 profile,不应导致进程崩溃。branch 数据应仅在运行时 branch profiling 开启时写入 ap。
If AOT profile data exceeds the hard size limit, the current save should be skipped and the old profile should be kept. The process should not crash. Branch data should be written only when runtime branch profiling is enabled.
如何复现该缺陷
构造包含大量 method profile 数据的应用或测试用例,使待落盘 profile size 超过限制;触发 profile 保存流程后,进程可能在大 Buffer 分配路径崩溃。
Create an application or test case with a large amount of method profile data so that the profile size exceeds the limit, then trigger profile saving. The process may crash in the large Buffer allocation path.
其他补充信息
版本或分支信息