I've been using gnugo to help improve my go skills, and I find it very 
helpful.  Thank you for making this available.  I decided to try development 
version 3.7.2, and found a problem with:

        gnugo --score estimate -l anygame.sgf

This gives me a segmentation fault.  I tried the latest CVS version and got 
the same thing.  Not that it matters, but this is on a relatively unmodified 
SuSE 9.1 Linux system, with gnugo compiled with gcc 3.3.3.

So I tracked the problem down, and found that sometimes gnugo_estimate_score 
is called with NULL arguments, but the function doesn't test for that.  
Here's a trivial patch which fixes the problem:


--- engine/interface.c.orig     2005-01-06 11:50:27.000000000 -0800
+++ engine/interface.c  2005-03-12 23:45:10.000000000 -0800
@@ -353,8 +353,10 @@
 gnugo_estimate_score(float *upper, float *lower)
 {
   silent_examine_position(EXAMINE_DRAGONS);
-  *upper = white_score;
-  *lower = black_score;
+  if (upper != NULL)
+    *upper = white_score;
+  if (lower != NULL)
+    *lower = black_score;
   return ((white_score + black_score)/2.0);
 }
 


-- 
                Eric Backus <[EMAIL PROTECTED]>


_______________________________________________
gnugo-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnugo-devel

Reply via email to