Re: DB backend support for lmdb?
Matthias Andree <[email protected]> Sat, 26 Jan 2019 11:02:01 +0100
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 25.01.19 um 23:53 schrieb Steffen Nurpmeso: > Hallo Matthias! > > Matthias Andree wrote in <[email protected]>: > |Am 17.01.19 um 19:06 schrieb Steffen Nurpmeso: > |> Matthias Andree wrote in <[email protected]= >: > ... > |> Due to some thread on a NetBSD ML i had a glance on the LMDB code > |> and saw that one overflow check condition was not right. It > |> cannot happen in practice because LMDB key length restriction is > |> far below 31-bit (511 bytes by default), but still one overflow > |> could happen and would not be detected because of wraparound. > |> This is fixed by the attached patch. (Tests all fine but the > |> skipped ones.) > |> > |> Do you have any plans on doing a new bogofilter release? It is of > |> course nothing but purely selfish ... but KyotoCabinet is also > |> a new backend, and is lingering for some time, too. If i diff > |> from my imported master (v1.2.4), there are quite some changes. > |> (I definetely have seen releases with fewer changes.) > |> > |> No git yet it seems, but v1.2.4 seems to be more than five years > |> old, hm hm. v1.2.5 would be cool, anyway! > ... > |indeed no Git yet, real-life work went crazy last autumn as in really > |crazy, so I pushed everything back quite a bit. > > Yes, of course. You have been talking about it, that is why. > I normally do not have all the auto* series installed, so my > personal interest tends to look in direction pre-prepared ball... Hi Steffen, indeed. At any rate, your patch has been committed as r7078, my apologies for miscapitalizing your first name. > |Thanks for proactively maintaining and catching up your LMDB support so > |we can refine it! > > I was only fixing a bad overflow check, which should have been > avoided from the start. If it would be that easy. :-) Plans sometimes fail the test of reality. > |However, can I ask you to resend the patch without the many > |reformattings? There's a lot of > | > |foo *=A0=A0=A0=A0 ->=A0=A0=A0 foo* > | > |reformatting going on that obscures the actual change. > > Mist! You recognized it!!! I have now compiled with C++ compiler > by myself, to proactively avoid that you have to add more of that > terrible "foo *" syntax instead of my beautiful "foo*" notation. > Fixed in the below. Beauty lies in the eye of the beholder, they say. Having the C code written in a C++ compatible way may help portability such that if people use arcane systems that don't have a decent C compiler, they sometimes at least have a reasonable C++ compiler... most of these C-style casts happen because C++ doesn't implicitly cast void * to other pointer types. We could use a macro. Or switch to C++ 17. Or just go as it is with a few casts around the *alloc() functions, which is what I'll do for the time being. Thanks again! Best, Matthias _______________________________________________ bogofilter-dev mailing list [email protected] https://www.bogofilter.org/mailman/listinfo/bogofilter-dev