chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Bug in MD5 egg?


From: Alejandro Forero Cuervo
Subject: [Chicken-users] Bug in MD5 egg?
Date: Thu, 10 Jun 2004 12:53:38 -0500
User-agent: Mutt/1.5.5.1+cvs20040105i

Hi.

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)))))

Can anyone please try this in  a big directory with lots of files
(in my case  it is a directory with 3600  files totaling 47m) and
confirm  the error?   Please  do  run it  a  few  (10?) times  in
different csi processes, as,  strangely, the error doesn't always
occur.

Thanks!

Alejo.
http://bachue.com/alejo

---=(  Comunidad de Usuarios de Software Libre en Colombia  )=---               
                                               
---=(  http://bachue.com/colibri )=--=( address@hidden  )=---                   
                                           

Attachment: signature.asc
Description: Digital signature


reply via email to

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