added 2 commits
May 7, 2020 02:24nrc approved these changes May 7, 2020
ti-chi-bot
Bot
added
the
needs-rebase
label
Apr 23, 2023This was referenced
Aug 6, 2026Merged
Closed
Merged
Merged
paulocsanz added a commit to paulocsanz/tikv that referenced this pull request
Aug 6, 2026Stop advancing src_ptr after the empty terminator group (remaining==0). The old loop always did ptr::add(MEMCMP_GROUP_SIZE) after every group; after the final empty padded group that steps past one-past-the-end of the allocation (UB under Rust pointer rules / Miri), same class as tikv#7751. When len is a multiple of the group size the encoder still correctly emits a full data group (padding 0) then one empty terminator group; only the post-terminator advance is removed. Also adds miri_soundness_mem_comparable_encode_all_naive which, under Miri, fails on pre-fix code and checks equality with encode_all after the fix.
Closed
paulocsanz added a commit to paulocsanz/tikv that referenced this pull request
Aug 6, 2026Stop advancing src_ptr after the empty terminator group (remaining==0). The old loop always did ptr::add(MEMCMP_GROUP_SIZE) after every group; after the final empty padded group that steps past one-past-the-end of the allocation (UB under Rust pointer rules / Miri), same class as tikv#7751. When len is a multiple of the group size the encoder still correctly emits a full data group (padding 0) then one empty terminator group; only the post-terminator advance is removed. Also adds miri_soundness_mem_comparable_encode_all_naive which, under Miri, fails on pre-fix code and checks equality with encode_all after the fix. Signed-off-by: Paulo Cabral Sanz <paulo@railway.app>
paulocsanz added a commit to paulocsanz/tikv that referenced this pull request
Aug 6, 2026Stop advancing src_ptr after the empty terminator group (remaining==0). The old loop always did ptr::add(MEMCMP_GROUP_SIZE) after every group; after the final empty padded group that steps past one-past-the-end of the allocation (UB under Rust pointer rules / Miri), same class as tikv#7751. When len is a multiple of the group size the encoder still correctly emits a full data group (padding 0) then one empty terminator group; only the post-terminator advance is removed. Also adds miri_soundness_mem_comparable_encode_all_naive which, under Miri, fails on pre-fix code and checks equality with encode_all after the fix. Signed-off-by: Paulo Cabral Sanz <paulosanz@poli.ufrj.br>
This was referenced
Aug 6, 2026Closed
Merged
Merged