已开启
Skip utf8 trans format expansion in Want::Marshalling for broker process #873
Skip utf8 trans format expansion in Want::Marshalling for broker process #873
已开启
m0_65533854创建于 6 天前
m0_65533854
m0_65533854
6 天前

IssueNo:#1227

Description: Want::Marshalling 中 PARAM_STRING_TRANS_FORMAT_UTF8 分支追加 selfUID != BROKER_UID(5557) 条件:broker 进程(Anco 跨端代理)不启用 UTF8 扩展格式(不加 PARAM_WANT_EXPANSION_TAG 前缀、不设置扩容标志),回落旧序列化格式;非 broker 进程行为不变。BROKER_UID 常量与 ability_runtime/huks 现有定义同源同值,判断模式参考 uri_permission_manager_client.cpp 的 CheckUseRawData()。

稳定性自检:

自检项 自检结果
涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 不涉及,仅序列化分支判断
成员变量进行赋值或创建需要排查并发 不涉及
谨慎在lambda表达式中使用引用捕获 不涉及
谨慎在未经拷贝的情况下使用外部传入的string、C字符串 不涉及
map\vector\list\set等stl模板类使用时需要排查并发 不涉及
谨慎考虑加锁范围 不涉及
在IPC通信中谨慎使用同步通信方式 不涉及
禁止传递this指针至其他模块或线程(特别是eventhandler任务) 不涉及
禁止将外部传入的裸指针在内部直接构造智能指针 不涉及
禁止多个独立创建的智能指针管理同一地址 不涉及
禁止在析构函数中抛异步任务 不涉及
禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 不涉及
禁止在对外接口中未经判空直接使用外部传入的指针 不涉及
禁止接口返回局部变量引用 不涉及
禁止在信号函数中加锁 不涉及
禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 不涉及,getuid 为轻量系统调用
禁止将同一个cpp编译在不同的so中 不涉及

安全编码自检:

自检项 自检结果
裸指针避免通过隐式转换构造为sptr 不涉及
json对象在取值之前必须先判断类型,避免类型不匹配 不涉及
序列化时必须对传入的数组大小进行校验,避免出现超大数组 不涉及
避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 不涉及,uid_t 与 constexpr int32_t 比较
外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 不涉及
指针变量、表示资源描述符的变量、bool变量必须赋初值 不涉及
readParcelable获取的对象使用前需要判空 不涉及
分配和释放内存的函数需要成对出现 不涉及
申请内存后异常退出前需要及时进行内存释放 不涉及
内存申请前必须对内存大小进行合法性校验 不涉及
内存分配后必须判断是否成功 不涉及
禁止使用realloc、alloca函数 不涉及
禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 不涉及
禁止打印内存地址 不涉及
整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 不涉及,仅等值比较
禁止对有符号整数进行位操作符运算 不涉及
禁止对指针进行逻辑或位运算 不涉及
循环次数如果受外部数据控制,需要检验其合法性 不涉及
禁止使用内存操作类危险函数,需要使用安全函数 不涉及
谨慎使用不可重入函数 不涉及
必须检查安全函数的返回值,并进行正确处理 不涉及
禁止仅通过TokenType类型判断绕过权限校验 不涉及

TDD Result: 待 CI 门禁(dayu200/master_inner_build)编译与测试覆盖

XTS Result: 不涉及,序列化分支条件调整由 CI 门禁测试覆盖

是否已执行L0用例

Feature or Bugfix

是否涉及非兼容变更/Whether it involves incompatible changes

likedislike
合并受阻
m0_65533854m0_65533854
6 天前 关联了issue:Want::Marshalling 在 broker 进程不应启用 UTF8 扩展格式
m0_65533854
m0_65533854
6 天前 评论:

start build

likedislike
openharmony_ciopenharmony_ci成员
6 天前 添加了label:waiting_on_author
openharmony_ci
openharmony_ci成员
6 天前 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
6 天前 添加了label:dco检查成功
openharmony_ci
openharmony_ci成员
6 天前 评论:

首次触发
门禁构建开始,包含静态检查、代码编译和测试【dayu600_7885测试, dayu600_7885编译, dayu200测试, master_inner_build编译, dayu200_tdd编译, ohos-host_mini_tdd编译, dayu200编译, x86_64_virt编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a9549d664650f998b17718f/runlist

likedislike
m0_65533854
m0_65533854
6 天前 评论:

CodeCheck 检视结果

gate_check.py code --base gitcode/master --profile capi(C++ 规则集,扫描变更文件 want.cpp):

正式违规:0 处,通过(exit 0)

提示项(非阻断,均为未改动的存量代码,与本 diff 无关):

  • [FUNC.CC] ReadWantFromJson() 圈复杂度启发值 22 > 20(want.cpp:79,匿名命名空间存量函数)
  • [G.FUD.05] ReadWantFromJson() nbnc=58 > 50(同上)

本次变更仅 5 行(+5/-1),逐条核对:

检查项 结果
行宽 ≤120(G.FMT.05) ✓ 最长行 98 字符
裸魔法数(G.CNS.02) BROKER_UID = 5557 为命名 constexpr,与 ability_runtime(ability_manager_service.cpp:295、update_caller_info_util.cpp:54、uri_permission_manager_client.cpp:30)及 huks(HKS_ANCO_BROKER_UID)同源同值
许可证头(OAT.3) ✓ 未新增文件
WordsTool 词表 ✓ 无敏感词
稳定性关注点 ✓ getuid() 为无阻塞轻量系统调用,非重入/加锁问题;判断仅在 Marshalling 序列化路径

逻辑正确性

  • selfUID != BROKER_UID&& 右侧条件,短路求值——非 broker 进程仅增加一次 getuid() 开销,GetBoolParam 语义不变
  • broker 进程:action 不加 PARAM_WANT_EXPANSION_TAG 前缀、parameters_ 不设扩容标志,ReadFromParcel 侧无需对应修改(对端不产生带 tag 的数据)
  • 行为对非 broker 进程(含现有单测)完全不变
likedislike
openharmony_ciopenharmony_ci成员
6 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
6 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
6 天前 添加了label:冒烟测试失败
openharmony_ci
openharmony_ci成员
6 天前 评论:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a9549d664650f998b17718f/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 dayu200 success success >>>
2 dayu200_tdd success NA >>>
3 master_inner_build success(IGNORE) NA >>>
4 ohos-host_mini_tdd success NA >>>
5 dayu600_7885 success failed(ecotest timeout) >>>
6 x86_64_virt success NA >>>

likedislike
m0_65533854
m0_65533854
6 天前 评论:

start update build

likedislike
openharmony_ciopenharmony_ci成员
6 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
6 天前 删除了label:冒烟测试失败
openharmony_ci
openharmony_ci成员
6 天前 评论:

部分构建失败,仅触发失败构建
门禁构建开始,包含代码编译和测试【dayu600_7885测试, dayu600_7885编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a95700664650f998b24a5f2/runlist

likedislike
openharmony_ciopenharmony_ci成员
6 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
6 天前 添加了label:冒烟测试成功
openharmony_ciopenharmony_ci成员
6 天前 通过测试
openharmony_ci
openharmony_ci成员
6 天前 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a95700664650f998b24a5f2/runlist

# Device build result test result package
1 dayu600_7885 success success >>>

likedislike
openharmony_ciopenharmony_ci成员
6 天前 删除了label:waiting_on_author
openharmony_ciopenharmony_ci成员
6 天前 添加了label:waiting_for_review
openharmony_ci
openharmony_ci成员
6 天前 评论:

您好,Committer @jayleehw @uniquexch @littlejerry1 @ccllee1 @yangxuguang-huawei ,请分配检视人员检视该PR,可以通过命令"assign [@someone_id]"分配检视人员,也可以直接评论"assign"分配给自己进行检视。


Hello, Committer @jayleehw @uniquexch @littlejerry1 @ccllee1 @yangxuguang-huawei . Please assign someone to review the PR. You can assign a reviewer by using the command "assign [@someone_id]", or you can comment "assign" to review the PR by yourself.

likedislike
m0_65533854m0_65533854
6 天前 测试状态已重置,测试人: openharmony_ci
m0_65533854m0_65533854
6 天前 强制推送  5 个提交:76309038-4 commits from branch master993429b3-Skip utf8 trans format expansion in Want::Marshalling for broker process
m0_65533854
m0_65533854
6 天前 评论:

start build

likedislike
openharmony_ciopenharmony_ci成员
6 天前 删除了label:静态检查成功
openharmony_ciopenharmony_ci成员
6 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
6 天前 删除了label:冒烟测试成功
openharmony_ci
openharmony_ci成员
6 天前 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【master_inner_build编译, dayu600_7885编译, dayu600_7885测试, dayu200_tdd编译, dayu200测试, x86_64_virt编译, ohos-host_mini_tdd编译, dayu200编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a958c4964650f998b2e3e3b/runlist

likedislike
openharmony_ci
openharmony_ci成员
6 天前 评论:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ci成员
6 天前 评论:

监测到PR: https://gitcode.com/openharmony/ability_ability_base/merge_requests/873 代码有更新,当前正在执行的门禁任务已自动中止,如有需要,可重新触发

likedislike
openharmony_ciopenharmony_ci成员
6 天前 删除了label:waiting_for_review
openharmony_ciopenharmony_ci成员
6 天前 添加了label:waiting_on_author
openharmony_ci
openharmony_ci成员
6 天前 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
m0_65533854
m0_65533854
6 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
6 天前 评论:

部分构建失败,仅触发失败构建
门禁构建开始,包含代码编译和测试【master_inner_build编译, ohos-host_mini_tdd编译, x86_64_virt编译, dayu600_7885编译, dayu200编译, dayu200测试, dayu200_tdd编译, dayu600_7885测试】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a958d2c64650f998b2e8835/runlist

likedislike
openharmony_ciopenharmony_ci成员
6 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
6 天前 添加了label:冒烟测试失败
openharmony_ci
openharmony_ci成员
6 天前 评论:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a958d2c64650f998b2e8835/runlist

# Device build result test result package
1 dayu200 success success >>>
2 dayu200_tdd success NA >>>
3 master_inner_build failed(IGNORE)(联合门禁失败) NA >>>
4 ohos-host_mini_tdd success NA >>>
5 dayu600_7885 success failed(ecotest timeout) >>>
6 x86_64_virt success NA >>>

likedislike