感谢提交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.


感谢对仓颉社区的支持与关注,欢迎反馈缺陷。 | 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.cppof thecj_ability_ffilibrary includessecurec.hand uses secure functions (e.g. memcpy_s), but theexternal_depsarray of theohos_shared_library("cj_ability_ffi")block in its BUILD.gn does not declare thebounds_checking_function:libsec_shareddependency, which may cause unresolved symbols at link time or build failures.期望行为是什么? | What is the expected behavior?
在
frameworks/cj/ffi/BUILD.gn的ohos_shared_library("cj_ability_ffi")块的external_deps数组中补齐"bounds_checking_function:libsec_shared"。Add
"bounds_checking_function:libsec_shared"to theexternal_depsarray of theohos_shared_library("cj_ability_ffi")block inframeworks/cj/ffi/BUILD.gn.如何复现该缺陷? | How to reproduce the bug?
frameworks/cj/ffi/BUILD.gn中cj_ability_ffi目标的external_deps,确认其中不包含bounds_checking_function:libsec_shared。frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp第 20 行,确认#include "securec.h"。cj_ability_ffi目标,观察是否出现安全函数符号未定义等问题。其他补充信息 | Additional information
涉及文件:
frameworks/cj/ffi/BUILD.gn(ohos_shared_library("cj_ability_ffi")的external_deps)frameworks/cj/ffi/application_context/src/cj_utils_ffi.cpp:20cjc版本信息 | cjc version information
N/A
分支版本信息 | Branch version information
[x] main(迭代版本)
[ ] release/1.1(STS版本)
[ ] release/1.0(LTS版本)