You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look up a record using lower_bound and it is after the last key in the database; you can get a crash when trying to read or seek via the iterator (i cant remember which I did that caused the crash). You need to handle the -- case a bit like the patch I made here: PowerDNS/pdns@0844062#diff-562825383c4b03c7c0504a94cfc4d2abR388
There is a similar issue with ++, but it is slightly harder to solve as a SET_RANGE will always return the next record ie it would only get into this state as the result of a -- and I'm not sure if it would do that even then - need to look at the lmdb docs. Lets say you were on the first record of the iterator and you -- it, I'm guessing d_end goes to true but you are actually at the beginning rather than the end. I think you probably need to keep track of both states and do a MDB_FIRST type lookup, blanking a d_before_first type flag...
The text was updated successfully, but these errors were encountered:
If you look up a record using
lower_bound
and it is after the last key in the database; you can get a crash when trying to read or seek via the iterator (i cant remember which I did that caused the crash). You need to handle the--
case a bit like the patch I made here:PowerDNS/pdns@0844062#diff-562825383c4b03c7c0504a94cfc4d2abR388
There is a similar issue with
++
, but it is slightly harder to solve as aSET_RANGE
will always return the next record ie it would only get into this state as the result of a--
and I'm not sure if it would do that even then - need to look at the lmdb docs. Lets say you were on the first record of the iterator and you--
it, I'm guessingd_end
goes totrue
but you are actually at the beginning rather than the end. I think you probably need to keep track of both states and do aMDB_FIRST
type lookup, blanking ad_before_first
type flag...The text was updated successfully, but these errors were encountered: