[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Bug in MD5 egg?

From: Felix Winkelmann
Subject: Re: [Chicken-users] Bug in MD5 egg?
Date: Fri, 11 Jun 2004 07:00:59 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

Alejandro Forero Cuervo wrote:


Sometimes, when  calculating a  MD5 sum in  a big  directory with
lots of files, I get a  stack overflow error.  I modified my code
to contain  only tail  recursive calls  but it  didn't help  so I
suspect the MD5 egg might have a bug.  I took a quick peek at the
code of the MD5 egg and couldn't find the problem.

The following code *sometimes* triggers the error:

(require 'md5)

(let loop ((f (remove directory? (directory "."))))
  (if (not (null? f))
    (let ((in (open-input-file (car f))))
      (format #t "~A: ~A~%" (car f) (md5:digest in))
      (close-input-port in)
      (loop (cdr f)))))

Hm, probably their is something fishy in md5:digest. AFAIK
it doesn't do anything that could trigger the stack-overflow,
but I'll take a look and try to find the problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]