gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] arend_3_17.1 crashes


From: Arend Bayer
Subject: Re: [gnugo-devel] arend_3_17.1 crashes
Date: Wed, 19 Feb 2003 01:55:07 +0100 (CET)

> After the patch arend_3_17.1 which went in today we get crashes.
> I've verified this on two machines.  However the crashes are not
> the same. On one machine, reading:1 crashes. On another, the
> first 9 reading tests pass, followed by a failure at line 2218 of
> reading.c in reading:10.
>
> The crashes dissappear on backing out arend_3_17.1.

I will try to find out what happened, but I didn't get any problems
here.

> This patch also produces warnings:

> reading.c: In function `attack2':
> reading.c:3126: warning: `sgf_message' might be used uninitialized in this 
> function

I didn't fix this because I don't like to put an "sgf_message = NULL"
at the top of the function. This doesn't stop a bug if sgf_message
indeed doesn't get initialized. Indeed I wanted to suggest to add
"-Wno-uninitialized" to the gcc options. My reasoning for this is as
follows:

Most occurences of this warning are of the type above, i.e. are pretty
wrong. Adding a zero initialization is, as above, often would not fix
the bug if there was one.

On the other hand, if we avoid the bogus "sgf_message = NULL" at the
beginning, we can find this bug by using valgrind, which I am running on
GNU Go from time to time (which finds _all_ uninitialized memory
access).

Of course in some case -Wunitialized is useful, i.e. mostly for catching
some obvious local bugs immediately. So it's not a clear decision.

> I'm backing the patch out and moving it back into the
> pending column until we can get this sorted out.

Thanks.

Arend






reply via email to

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