Re: delay_pools.c is buggy in 2.3.STABLE3 :-(

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 13 Jun 2000 01:30:23 +0200

David Luyer wrote:
> I still prefer the original code as in 2.4DEVEL2 unless someone can
> prove a flaw in it.

The main flaw is that the code is almost impossible to understand by
anyone else than you.

Oddities:
a) Relies on having a unsigned char loop variable "silently" wrap around
from 255 to 0.
b) 255 is used as a EOF indicator in the maps, and at the same time it
is an allowed value.
c) To work around the above, map index position 255 is reserved for the
value 255, and a additional bit has been added indicating if this
position is used or not.
d) A lot of the calculations done in delay pools are done as side
effects of other statements. For example if statements with embedded
sideeffects.

The implementation might be very memory efficient (well, not actually in
this case), but if it isn't possible to understand what it does then it
is a nighmare maintain, and even harder to debug by someone else not
used to the code.

The "good" news is that we have now identified one area which needs
immediate fixing and cleanup before 2.4 is to be released.

/Henrik
Received on Mon Jun 12 2000 - 17:30:32 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:29 MST