🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #4876

Stack usage (Was: gnuchess/Linux woes)

#4876
From: Jochen Wiedmann
Date: Fri, 16 Sep 1994 19:35
24 lines
2020 bytes
In <359u06$3qt@src-news.pa.dec.com> mann@src.dec.com (Tim Mann) writes:

>Interesting points: (1) The problem is easily reproducible.  (2) When the
>program exits on me, it prints the message "Time Control Error" first.  This
>message is completely bogus.  It is printed only by some code in main() that
>parses command-line arguments!  Therefore I'm guessing the problem is that an
>array on the stack is overflowing and trashing the return address to a
>function call, causing a jump to a garbage address.  In the case I have, the
>address happens to be in the middle of main().  (3) As another poster
>reported, the bug seems to go away when -DKILLT is removed from the Makefile
>OPTS string.  This doesn't necessarily mean the bug is in the KILLT code,
>unfortunately, but that would be a good place to start looking.

Wouldn't it be possible to reduce gnuchess's stack usage in general?
The author of the ThinkC port has shown how. I don't know all sources,
but anything I know is that one needs to allocate certain arrays at
the beginning instead of declaring them on the stack. That could
prevent the need to have gnuchess versions for typical Unix machines
and small machines like PC, Mac or Amiga.


Jochen
-- 
Jochen Wiedmann			E-Mail: wiedmann@mailserv.zdv.uni-tuebingen.de
Technical Details
Message-ID: <zrawi01.779744146@decap2>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!zib-berlin.de!news.belwue.de!newsserv.zdv.uni-tuebingen.de!decap2!zrawi01
References: <1994Sep10.131209.19641@midway.uchicago.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,9047a92267d257eb
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-09-17 11:35:42 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!zib-berlin.de!news.belwue.de!newsserv.zdv.uni-tuebingen.de!decap2!zrawi01
From: zrawi01@decap2.zdv.uni-tuebingen.de (Jochen Wiedmann)
Newsgroups: gnu.chess
Subject: Stack usage (Was: gnuchess/Linux woes)
Date: 16 Sep 94 19:35:46 GMT
Organization: InterNetNews at ZDV Uni-Tuebingen
Lines: 24
Message-ID: <zrawi01.779744146@decap2>
References: <1994Sep10.131209.19641@midway.uchicago.edu>
NNTP-Posting-Host: decap2.zdv.uni-tuebingen.de