Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug with MemForest due to off-by-one error #62

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

Davidson-Souza
Copy link
Collaborator

@Davidson-Souza Davidson-Souza commented Jan 15, 2025

Fixes #59

When we try to find in what subtree our node is, we loop over all existing roots. However, this loop is not inclusive, and will never reach the highest tree. If we don't find the tree, it continues with 0 as the tree position, but this is wrong, and will cause problems downstream when we try to use that position.

This commit updates the loop and make it inclusive

When we try to find in what subtree our node is, we loop over all
existing roots. However, this loop is not inclusive, and will never
reach the highest tree. If we don't find the tree, it continues with `0`
as the tree position, but this is wrong, and will cause problems
downstream when we try to use that position.

This commit updates the loop and make it inclusive
@Davidson-Souza Davidson-Souza merged commit 6da503b into mit-dci:main Jan 17, 2025
10 checks passed
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.

MemForest::prove can panic in certain cases
1 participant