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

r64: Increase number of frames in ART iterator #595

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

SLieve
Copy link
Contributor

@SLieve SLieve commented Feb 17, 2024

Fixes #593. With a max-depth ART, it's possible to have the following node structure, where N4 = Node4, L = Leaf:

N4 --> N4 --> N4 --> N4 --> N4 --> N4 --> L
   \-> L  \-> L  \-> L  \-> L  \-> L  \-> L

ART iterators carry around a frame per node in the path to the leaf, including the leaf. This can therefore result in 7 frames: one for each differing key byte, plus the leaf node itself.
To handle this case we therefore need 7 iterator frames rather than 6.

With a max-depth ART, it's possible to have the following node structure, where
N4 = Node4, L = Leaf:

N4 --> N4 --> N4 --> N4 --> N4 --> N4 --> L
   \-> L  \-> L  \-> L  \-> L  \-> L  \-> L

ART iterators carry around a frame per node in the path to the leaf, including
the leaf. This can therefore result in 7 frames: one for each differing key byte,
plus the leaf node itself.
To handle this case we therefore need 7 iterator frames rather than 6.
@SLieve SLieve marked this pull request as ready for review February 18, 2024 11:13
@SLieve SLieve requested a review from Dr-Emann February 18, 2024 11:13
@SLieve SLieve merged commit f39a89b into RoaringBitmap:master Feb 18, 2024
20 checks passed
@SLieve SLieve deleted the art_too_deep branch February 18, 2024 14:02
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.

Segfault with roaring64_bitmap_flip_inplace
2 participants