Skip to content

fix: guard readFieldName lookahead against AIOOBE on trailing backslash - #22

Open
luckylucky0001 wants to merge 1 commit into
rg/base-7833-originalfrom
rg/7833-original
Open

luckylucky0001 wants to merge 1 commit into
rg/base-7833-originalfrom
rg/7833-original

Conversation

@luckylucky0001

Copy link
Copy Markdown
Owner

Fixes alibaba#7809

JSONReaderASCII.readFieldName() reads bytes[offset + 1] after seeing a backslash, but the loop guard only covers bytes[offset]. When a field name ends in a backslash, offset + 1 == end, so the lookahead runs off the array and throws ArrayIndexOutOfBoundsException instead of JSONException.

Add an explicit check: if the backslash is the final byte, throw JSONException, matching how malformed field names are handled elsewhere.


Evaluation replay of alibaba#7833 (alibaba#7833). This PR stays open unless a separately authorized merge workflow runs.

JSONReaderASCII.readFieldName() reads bytes[offset + 1] after seeing a backslash,
but the loop guard only covers bytes[offset]. When a field name ends in a backslash
(e.g. `{"\`, `{"a\`), offset + 1 == end, so the lookahead runs off the array and
throws ArrayIndexOutOfBoundsException instead of the expected JSONException.

Add an explicit check: if the backslash is the final byte, throw JSONException
(matching how malformed field names are already handled elsewhere).
@luckylucky0001

Copy link
Copy Markdown
Owner Author

本机 medium 档代码评审结果

上游来源:alibaba#7833。样本:原版 PR。
提交:9f6e768e7e7cf79bc67286768386c33c77bd4b09;基线:30dd009d196687d23e1bb718a6649dac3b356bda。
评审版本:38140bf49ec0f925;结果时间:2026-09-23T18:38:37.001Z。只对应上述提交;与旧版评论分别记录。

结论分三种:通过;需关注(AI 意见和无法验证的内容,不阻止合并);阻断(只在执行证据证实本 PR 引入缺陷,或仓库自己的 CI 失败时)。单条意见:已确认=通过稳定复现、归因和证据准入的缺陷;疑似=尚未排除、证据仍不足;待确认=未复现、既有行为或未完成验证;团队强制规则=命中团队规则,需人工确认。

推理档位 结果 验证完整 测试通过/总数 跳过 测试报告完整 准入证据 infra unknown flaky 基线已失败 建议人工介入记录
medium 阻断:仓库 CI 失败 是 241/241 0 是 0 0 0 0 0 0

medium 失败计数分域:PR 侧 unknown 0;基线侧失败 0 项,其中 unknown 0 项。unknown 保持原分类,不构成准入证据。

请求模型:doubao-seed-evolving。实际返回模型:medium=doubao-seed-evolving-latest-version。

medium · 阻断:仓库 CI 失败:Test JDK 17 on ubuntu-24.04。

medium 结论

建议人工介入项不作为确认缺陷或自动修复的证据;尚未排除的疑似缺陷仍需核查。本结果只覆盖该提交、本次已执行测试与medium 档评审。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants