radix_tree: fix upper_bound implementation#906
Conversation
Codecov Report
@@ Coverage Diff @@
## master #906 +/- ##
==========================================
+ Coverage 95.95% 96.02% +0.06%
==========================================
Files 48 48
Lines 6083 6085 +2
==========================================
+ Hits 5837 5843 +6
+ Misses 246 242 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
szyrom
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved
lukaszstolarczuk
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved
If a key was not present in a radix tree and a slot variable was set to &root, next_leaf function lead to accessing uninitialzied memory (we tried to increment slot, as if it was a pointer to an element in array).
In internal_bound we actually rely on leaf node to be the leftmost one.
63b0daf to
cb2091f
Compare
szyrom
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
lukaszstolarczuk
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
If a key was not present in a radix tree and a slot variable was
set to &root, next_leaf function lead to accessing uninitialzied memory
(we tried to increment slot, as if it was a pointer to an element in array).
This change is