Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Possible bug in code.

Author: Uri Blass

Date: 04:23:28 08/14/03

Go up one level in this thread


On August 14, 2003 at 07:03:25, Tim Foden wrote:

>On August 14, 2003 at 06:43:38, Joost Buijs wrote:
>
>>You can try something like this:
>>
>>#include <stdio.h>
>>#include <stdlib.h>
>>#include <string.h>
>>
>>int queens[9][2];
>>int rooks[10][2];
>>int bishops[10][2];
>>int knights[10][2];
>>int pawns[8][2];
>>
>>void WriteArrays(int nodes)
>>{
>>	char fname[14];
>>	FILE *fp;
>>
>>	sprintf(fname,"Movei%d.d",nodes);
>
>Possible buffer overrun here... nodes my well be > 9999  :)  Looking at other
>posts of Uri's, numbers like "213,298,603" were quoted.  Safer maybe to make
>fname at least 20 chars long.  (same problem in CompareArray() too.)
>
>Cheers, Tim.

Thanks
I already changed it to 20 and started to test it.

I asked it to write files every 1048576 nodes
I am also going to compare it to find 1048576 interval that it is not the same.

After it I may reduce it to writing every 1024 nodes and later every node.

It is 3 runs but clearly less runs then what I could do without it when I
usually divided the interval by at most 64 in every double run and had a lot
of boring manually checking to see where is the error.

I do not like to have more than 1024 files per run(but maybe I should care less
about not writing too many small files).

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.