This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix nss_db crash when db contains exactly one entry


On Tue, Nov 27, 2012 at 11:42:46AM -0500, Carlos O'Donell wrote:
> 
> Please inline your patches, it makes it *way* easier to review and comment.
> 

Ah I noticed that after I posted them.  I switched to mutt recently
and I guess I need to fix something in my muttrc.

> The function is a modified `Trial Division' algorithm for computing
> the next prime.
> 
> Please replace it with a correctly working Trial Division algorithm
> that uses squaring to avoid square roots. Then we can remove the
> quirky restrictions and end up with a robust piece of code that
> doesn't fail in weird corner cases.
> 
> I suggest looking at:
> http://en.literateprograms.org/Trial_division_%28C%29
> 
> I suggest against a Sieve of Eratosthenes because it increases the
> memory required by the computation. Keep it simple and low memory.
> 

OK thanks, I'll send an updated patch soon.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]