已关闭
[Bug]: cj_window_ffi BUILD.gn 缺少 bounds_checking_function:libsec_shared 依赖 #15214
ding_hong_4创建于  7月23日关闭于  19 天前
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.

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

The source files of the window_manager:cj_window_ffi library include securec.h/securectype.h and use secure functions (e.g. memcpy_s), but the external_deps array of the ohos_shared_library("cj_window_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?

在 interfaces/kits/cj/window_runtime/BUILD.gn 的 ohos_shared_library("cj_window_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_window_ffi") block in interfaces/kits/cj/window_runtime/BUILD.gn.

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

  1. 查看 interfaces/kits/cj/window_runtime/BUILD.gn 中 cj_window_ffi 目标的 external_deps,确认其中不包含 bounds_checking_function:libsec_shared。
  2. 查看以下源文件,确认 #include "securec.h" 或 #include "securectype.h"(用 grep 得到的真实行号替换):
  • interfaces/kits/cj/window_runtime/window_impl.cpp(第 20 行:#include "securec.h"
  1. 构建 cj_window_ffi 目标,观察是否出现安全函数符号未定义等问题。

其他补充信息 | Additional information

涉及文件:

  • 构建配置:interfaces/kits/cj/window_runtime/BUILD.gn(ohos_shared_library("cj_window_ffi") 的 external_deps)
  • 使用 securec 的源文件:
  • interfaces/kits/cj/window_runtime/window_impl.cpp(第 20 行:#include "securec.h"

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社区支持命令清单。如果有问题,请联系 [@nyankomiya](https://gitcode.com/nyankomiya) [@logn](https://gitcode.com/logn) [@chyyy0213](https://gitcode.com/chyyy0213) [@hejunfei1991](https://gitcode.com/hejunfei1991) [@stupidb](https://gitcode.com/stupidb) [@lollipopolive](https://gitcode.com/lollipopolive) [@JUGaaab](https://gitcode.com/JUGaaab) 。如果需要调整订阅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_window_ffi external_deps
CCangjie-wanggang
20 天前 关联了pull request:fix: add bounds_checking_function:libsec_shared to cj_window_ffi external_deps
openharmony_ciopenharmony_ci成员
19 天前 关闭了 issue
openharmony_ciopenharmony_ci成员
19 天前 issue状态由 待办的 改变为 已完成