[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Uninitialized conditional jump
From: |
Gunnar Farnebäck |
Subject: |
Re: [gnugo-devel] Uninitialized conditional jump |
Date: |
Fri, 01 Oct 2004 14:59:45 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI) |
Dan wrote:
> Since Valgrind complained at line 290 but not at the earlier
> line 285, I infer that goal[pos] is initialized but
> goal[pos+delta[j]] is not. So this must be some problem
> at the edge of the board.
It is, more specifically at the bottom edge of the board. (goal is
initialized up to BOARDMAX but neighbors off the bottom edge of the
board have values between BOARDMAX and BOARDSIZE.) Try changing line
290 to
if (ON_BOARD(pos + delta[j]) && goal[pos + delta[j]])
/Gunnar