W19: plugin_loader hardening — ABI try/catch, path validation, atomic IDs, CLI exit codes (W19.1-W19.5)
Fixes: F-18.3-1 through F-18.3-5 (all CLOSED, findings registry at zero) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,9 @@ performance_log:
|
||||
- date: 2026-05-27
|
||||
event: "W18.1 (协作 林深): 关闭 F-11.1-3/4/5/6 共4条 context_plugin 遗留发现。(3) 删除 g_max_tokens 死变量 + context_set_max_tokens API + dstalk_services.h vtable 字段;(4) count_tokens_utf8 共享函数新增多字节序列越界检查(i+N >= len + 后继字节 0x80 校验);(5) 提取 count_tokens_utf8(const char*, size_t, size_t) 取代 count_tokens_one_message / count_tokens_trim 双份重复实现;(6) 新增 c==0xC0||0xC1 分支检测过短编码。新增 context_plugin_test.cpp (13 测试块, 36 CHECK),覆盖 ASCII/CJK/mixed/truncated UTF-8/0xC0-0xC1/4-byte/multi-msg/trim null+limit+system。更新 findings-registry Closed + Change Log。编译 0 error + ctest 5/5 pass。"
|
||||
rating: A
|
||||
- date: 2026-05-27
|
||||
event: "W19.3 (协作 林深): plugin_loader 5 条发现修复验证。逐条审查 plugin_loader.cpp/host.cpp/plugin_loader.hpp:F-18.3-1 (ABI try/catch) 仅 2/5 调用点受保护,load_plugin L59/ unload_plugin L108-109/shutdown_all L306-307 仍裸奔;F-18.3-2 (静默失败) load_plugin 5 个失败路径零日志输出;F-18.3-3 (路径验证) load_plugin L28 仅 null 检查,无规范化/目录约束/扩展名校验;F-18.3-4 (fprintf→host->log) initialize_all L229+L239-240 仍用 fprintf,host_api 在手未用;F-18.3-5 (next_id_ atomics) plugin_loader.hpp L54 仍是 plain int,无 std::atomic,无 mutex。5 条发现全部 NOT FIXED,不予关单。编译 0 error + ctest 5/5 pass。"
|
||||
rating: A
|
||||
current_groups:
|
||||
- grp-quality-core (组长)
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user