Repository navigation
fix: 原地写只改 body,越界硬错(ViewWrite 收紧 len == value_len) - #68
Merged
Merged
Conversation
- body 直写按 head 声明长度限制,越界直接硬错,不再静默写到容量区 - ViewWrite 契约收紧:len 必须等于 value_len - 新增契约测试 tests/test_inplace_body_only(旧库失败、新库通过) Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
与 kvlang
runtimec2侧配套的收紧:原地写只改 body、越界硬错。对端
kvlang 侧的 #607(body 直写改用 head 声明长度)与 #616(复合描述符
*[0,+k]·rest)。单边合入会让「原地写只改 body」的契约半成立——runtime 侧按 head 长度写、后端仍按容量放行时,越界不会被拦住。
内容(6 文件,+201/−11)
src/kvspace.c:body 直写按 head 声明长度限制,越界直接硬错,不再静默写到容量区src/kvspace_shm.h、src/durable_abi.c:配套调整ViewWrite契约收紧:len必须等于value_lentests/test_inplace_body_only.c(新增 160 行契约测试)、tests/test_slot_view.c同步、CMakeLists.txt增加测试目标双向证据
旧库(
3850c4a4源码 + 新测试):失败新库(本分支):通过
构建:CMake Release,
ctest11/11 通过(作者报 11/11,一致)。🤖 Generated with Claude Code