已关闭
[Bug]: cj_ability_ffi BUILD.gn 缺少 bounds_checking_function:libsec_shared 依赖 #15735
ding_hong_4创建于  7月23日关闭于  8月3日
ding_hong_4
ding_hong_4
7月23日 创建

感谢对仓颉社区的支持与关注,欢迎反馈缺陷。 | Thanks for your support and attention to the community. We welcome feedback on any issues.

发生了什么问题? | Describe the issue that occurred.

cj_ability_ffi 库的源文件 frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp#include "securec.h" 并使用了其中的安全函数(如 memcpy_s 等),但其对应的 BUILD.gn 中 ohos_shared_library("cj_ability_ffi") 块的 external_deps 数组未声明 bounds_checking_function:libsec_shared 依赖,可能导致链接阶段找不到安全函数符号或构建异常。

The source file frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp of the cj_ability_ffi library includes securec.h and uses secure functions (e.g. memcpy_s), but the external_deps array of the ohos_shared_library("cj_ability_ffi") block in its BUILD.gn does not declare the bounds_checking_function:libsec_shared dependency, which may cause unresolved symbols at link time or build failures.

期望行为是什么? | What is the expected behavior?

frameworks/cj/ffi/BUILD.gnohos_shared_library("cj_ability_ffi") 块的 external_deps 数组中补齐 "bounds_checking_function:libsec_shared"

Add "bounds_checking_function:libsec_shared" to the external_deps array of the ohos_shared_library("cj_ability_ffi") block in frameworks/cj/ffi/BUILD.gn.

如何复现该缺陷? | How to reproduce the bug?

  1. 查看 frameworks/cj/ffi/BUILD.gncj_ability_ffi 目标的 external_deps,确认其中不包含 bounds_checking_function:libsec_shared
  2. 查看 frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp 第 20 行,确认 #include "securec.h"
  3. 构建 cj_ability_ffi 目标,观察是否出现安全函数符号未定义等问题。

其他补充信息 | Additional information

涉及文件:

  • 构建配置:frameworks/cj/ffi/BUILD.gnohos_shared_library("cj_ability_ffi")external_deps
  • 使用 securec 的源文件:frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp:20

cjc版本信息 | cjc version information

N/A

分支版本信息 | Branch version information


[x] main(迭代版本)

[ ] release/1.1(STS版本)

[ ] release/1.0(LTS版本)

likedislike
ding_hong_4ding_hong_4
7月23日 添加了label:bug
openharmony_ci
openharmony_ci成员
7月23日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@jayleehw](https://gitcode.com/jayleehw) [@zhangyafei-echo](https://gitcode.com/zhangyafei-echo) [@littlejerry1](https://gitcode.com/littlejerry1) [@jsjzju](https://gitcode.com/jsjzju) [@wkljy](https://gitcode.com/wkljy) [@yzkp](https://gitcode.com/yzkp) [@ccllee1](https://gitcode.com/ccllee1) [@yangxuguang-huawei](https://gitcode.com/yangxuguang-huawei) [@li-weifeng2024](https://gitcode.com/li-weifeng2024) [@wendel](https://gitcode.com/wendel) 。如果需要调整订阅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.

likedislike
openharmony_ciopenharmony_ci成员
7月23日 添加了label:waiting_for_assign
ding_hong_4ding_hong_4
7月24日 关联了pull request:fix: add bounds_checking_function:libsec_shared to cj_ability_ffi external_deps
openharmony_ciopenharmony_ci成员
8月3日 关闭了 issue
openharmony_ciopenharmony_ci成员
8月3日 issue状态由 待办的 改变为 已完成