gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Current CVS crashes in golife.tst


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Current CVS crashes in golife.tst
Date: Sat, 12 Oct 2002 08:29:11 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Dan wrote:
> The current CVS version crashes in golife:2. The culprit is
> the patch evan_3_10.7.
> 
> The patch at the end of this message undoes evan_3_10.7.
> 
> I'll leave the CVS unchanged for now in case Gunnar sees
> a trivial fix for this.

I believe this qualifies as trivial.

/Gunnar

Index: engine/persistent.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/persistent.c,v
retrieving revision 1.2
diff -u -r1.2 persistent.c
--- engine/persistent.c 11 Oct 2002 08:23:45 -0000      1.2
+++ engine/persistent.c 12 Oct 2002 01:55:50 -0000
@@ -266,13 +266,14 @@
 
 
 /* Look for a valid read result in the persistent cache.
- * Return index of the entry found if there is a match, -1 if no match
+ * Return index of the entry found if there is a match, -1 if no match.
  */
 int
 search_persistent_reading_cache(int routine, int str, int *result, int *move)
 {
   int k;
   int r;
+  ASSERT1(str == find_origin(str), str);
 
   for (k = 0; k < persistent_reading_cache_size; k++) {
     /* Check that everything matches. */
Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.81
diff -u -r1.81 reading.c
--- engine/reading.c    11 Oct 2002 08:23:45 -0000      1.81
+++ engine/reading.c    12 Oct 2002 01:56:19 -0000
@@ -380,8 +380,10 @@
      */
     if (dcode == WIN && dpos == NO_MOVE) {
       int ai, di;
-      ai = search_persistent_reading_cache(ATTACK, str, NULL, NULL);
-      di = search_persistent_reading_cache(FIND_DEFENSE, str, NULL, NULL);
+      ai = search_persistent_reading_cache(ATTACK, find_origin(str),
+                                          NULL, NULL);
+      di = search_persistent_reading_cache(FIND_DEFENSE, find_origin(str),
+                                          NULL, NULL);
       if (ai != -1)
         delete_persistent_reading_entry(ai);
       if (di != -1)




reply via email to

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