Subject: bin/3126: games/gomoku segfaults
To: None <>
From: Andrew Wheadon <>
List: netbsd-bugs
Date: 01/18/1997 19:14:05
>Number:         3126
>Category:       bin
>Synopsis:       ./gomoku runs out of memory and segfaults
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 18 10:20:02 1997
>Originator:     Andrew Wheadon
The cost of living hasn't affected its popularity. (Mark Twain)
current	release=doc \ "NetBSD-current mirror"
hostbase=/mit/ftp/pub/NetBSD base=/usr prefix=/usr backup delete use-rel-suffix
>Release:        16.1.97
System: NetBSD 1.2B NetBSD 1.2B (WIPOOL) #0: Sat Jan 11 03:34:48 MET 1997 i386

When playing gomoku it will usually start using up masses of memory
after about 8 turns (4 each), it will then sit there calculating 
for about 5 minutes before it runs out of memory (if ulimit is set
to 16MB), after which it will segfault. (it failed 4 out of 5 times).
	play gomoku until it starts thinking for ages and then
	watch it growing with 'top' until it Segfaults.
unlimit and add lots of memory to machine or 
free memory after each game (not sufficient since it will often
use up too much memory in one game)
check whether malloc returns NULL and do appropriate action in 
pickmove.c (unluckily appropriate action means more than just "continue;")
make it more intelligent or
make the board smaller (not easy either)
or contact author for newer version.
rm -fr gomoku