On Thu, Feb 15, 2007 at 09:13:21PM +0100, Josselin Mouette wrote:
> Le jeudi 15 février 2007 à 19:20 +0100, Marco Nenciarini a écrit :
> > Package: puf
> > Version: 1.0.0-3
> > Severity: important
> > 
> > I've found that puf crashes almost all the time when attempts to do a
> > recursive fetch like
> > 
> > puf -r http://www.htdig.org/files
> > 
> > This ends in an endless loop after some file downloaded (n < 10) on
> > all my machine (all i386).
> > 
> > I've tried to find the problem and i've found that the url.c source
> > causes the error if is compiled with -ON for N >= 1 with gcc-4.1. If
> > compiled with -O0 all works ok wathever is the optimization settings
> > for other source objects.
> > 
> > The error (a s = s->next disappaired) is on the line containing h_find
> > (a macro defined in puf.h) in the first function of file (find_url).
> > 
> > I've investigated a lot on this problem, but i've not found a solution
> > other then disabling the optimization at all.
> 
> Without presuming because I haven't tested it, it is likely to be caused
> by the compiler optimizing the static global variables, while the
> software is relying on signals. If you don't want these variables to be
> optimized out, you must use the "volatile" keyword.
> 

Yes, you have hit the problem.

After declared all static globals as volatile all problems was
disappaired.

I'm preparing an upload with this fix.

Ciao

-- 
---------------------------------------------------------------------
|    Marco Nenciarini    | Debian/GNU Linux Developer - Plug Member |
| [EMAIL PROTECTED] | http://www.prato.linux.it/~mnencia       |
---------------------------------------------------------------------
Key fingerprint = FED9 69C7 9E67 21F5 7D95  5270 6864 730D F095 E5E4

Attachment: signature.asc
Description: Digital signature

Reply via email to