gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] Re: 3.5.4 on Tru64: assertion failure in ld_owl


From: Teun Burgers
Subject: [gnugo-devel] Re: 3.5.4 on Tru64: assertion failure in ld_owl
Date: Tue, 03 Feb 2004 19:01:55 +0100
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Paul wrote:

This must be solvable with `configure' script.  There is
a AC_FUNC_MALLOC() macro.  However, maybe it is easier to
alter the code.

I can work on Autoconf-based solution.  Let me know if it
is what we would like.

I would prefer a non-autoconf solution.

A quick solution is something like the following (basically the
same as suggested in the autoconf info):

Code avoiding a malloc call for the case list->counter == 0
would perhaps be better.

Teun

--- gnugo-3.5.4.orig/engine/owl.c       2004-01-24 04:22:46.000000000 +0100
+++ gnugo-3.5.4/engine/owl.c    2004-02-03 10:03:38.000000000 +0100
@@ -3606,7 +3606,7 @@
   int k;
   int limit;

-  list->pattern_heap = malloc(list->counter
+  list->pattern_heap = malloc(gg_max(list->counter, 1)
                              * sizeof(struct matched_pattern_data*));
   gg_assert(list->pattern_heap != NULL);







reply via email to

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