Repository navigation
Fix a join reporting an empty result for a non-empty byte node - #178
Merged
imlvts merged 3 commits intoNov 4, 2026
Merged
Conversation
DenseByteNode::join_child_into passed on the None that two empty nodes join to. merge_from_list_node merges the per-slot statuses, so a list node holding only dangling paths the byte node also has made the whole join None, and the byte node's other contents were dropped. Two dangling paths joined stay one dangling path, which is no change: Identity. join_child_into_left already did this. This is the debug assertion the algebraic fuzzer reported as finding 6, and one way a join lost values.
Contributor
|
Perhaps a cleaner example let mut a = PathMap::<()>::new();
a.create_path([0u8]); a.create_path([1u8]); a.set_val_at([2u8], ());
let mut b = PathMap::<()>::new();
b.create_path([0u8]); b.create_path([1u8]);
assert(a.join(&b).contains([2u8])) |
Two dangling paths shared by both sides and a value only in the left one: the join must keep the value.
Collaborator
Author
|
done |
Finding 4 of the algebraic fuzzer: with b a clone of a plus one value, a.join(&b) dropped that value while b.join(&a) kept it. Same cause as the empty-status fix: the byte node reported the list node's join as empty.
Collaborator
Author
|
re: "add the join fix separately to [here]" |
Owner
|
LGTM |
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.
DenseByteNode::join_child_into passed on the None that two empty nodes join to. merge_from_list_node merges the per-slot statuses, so a list node holding only dangling paths the byte node also has made the whole join None, and the byte node's other contents were dropped. Two dangling paths joined stay one dangling path, which is no change: Identity. join_child_into_left already did this.
This is the debug assertion the algebraic fuzzer reported as finding 6, and one way a join lost values.