Author: Francesco Di Tolla
Date: 01:16:50 11/04/02
Go up one level in this thread
On November 03, 2002 at 10:38:20, Uri Blass wrote: >I found that there is a bug in the latest version of movei and it seems based on >page 130 of the book "the practice of programming" that it is a memory >allocation error. > >I see different behaviour in debug configuration and in release configuration. >I also saw different behaviour when I only added one printf. > >My question is what is the fastest way to detect the bug. > >I have a lot of arrays and adding a code to check if I wrote outside the >allocated memory in every place is a lot of work. > >I think that it may be better if the compiler can do it for me(or maybe the >compiler can do it and I do not know how it can do it). > >Is there a reason that prevent the compiler to check only in debug mode that >what I put in the arrays make sense before putting the information in the >arrays? > >Note that I save previous versions of movei and I may try to compare number of >nodes in debug mode and release mode to try to find the latest version that has >the bug but the problem is that I cannot know that I have not the bug from >identical output and I can only know that I have a bug when the output is not >identical. > >Uri This is not a typical behaviour of out of bound indexing: that will give very easely a crash of the program, that might show up only onccasionally or only with specific compilation option. Looks more like an unitialized variable. regards Franz
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.