[Aldor-l] Code audit

Ralf Hemmecke ralf at hemmecke.de
Wed Jun 25 08:43:48 EDT 2008


Dear Pippijn,

I cannot say that I will be of much help since I don't have any 
knowledge of the compiler internals. And I am not fluent in LISP and C. 
Nevertheless, I'd be interested in looking more closely at the code so 
that eventually nasty bugs will be removed and a more stable compiler 
evolved.

Take the lead and just start discussing particular code chunks. 
Hopefully that at least results in a more documented code base.

Ralf

On 06/24/2008 10:32 PM, Pippijn van Steenhoven wrote:
> Hello Aldor List,
> 
> while reading, modifying and testing bits and pieces of the compiler,
> I came across many potentially unsafe fragments. These fragments
> include unsigned/signed comparisons, truncating assignments, unchecked
> integer overflow, etc. Things like that. Generally, these should not
> be problematic, but using an int as loop variable where the loop
> condition compares with Length is both non-descriptive and wrong on
> certain platforms. Where on 32 bit architectures, int and Length are
> probably equally sized, on 64 bit machines that use the LP64 data
> model (for instance gcc on linux/x86_64), Length is larger than int
> and therefore, the loop variable may not be able to loop through each
> element, causing infinite loops.
> 
> I suggest a thorough audit of the code, pointing out each arguable
> comparison, assignment, etc. There are several occasions where the
> modification required is straightforward, but many are not as clear
> and require deep knowledge of the code. Deep, by the way, is not just
> knowing what the code does, but more importantly, what the code was
> supposed to do when it was written. Who is up for some more active
> development?




More information about the Aldor-l mailing list