Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: MSVC code gen bug?

Author: Scott Gasch

Date: 13:19:51 12/31/01

Go up one level in this thread


On December 31, 2001 at 16:15:34, Dann Corbit wrote:
>>
>>        if (pHash->iFiles[WHITE][j] != 0)
>>        {
>>            //
>>            // Look for White doubled and tripled (etc...) pawns.
>>            //
>>            ASSERT(pHash->iFiles[WHITE][j] >= 0);
>>            ASSERT(pHash->iFiles[WHITE][j] <= 8);
>
>Oddly, this assert set looks inconsistent with the above.  If files are allowed
>to range from 0 to 8 inclusive, why are you checking for 1 to 8 above?

You're right, the first should be ASSERT(pHash->iFiles[WHITE][j] > 0).

>Once in a great while, I find a real compiler bug.  But they are quite rare
>now-days.  I rather suspect there is memory stomping going on somewhere.

If there is, it is a mystery to me.  At the point of the crash there is nothing
on the stack that looks remotely like the address of pHash.  I've also stepped
the compiler when it is setting pHash for the first time and the address is
never written out to the stack.  That said, it's probably my mistake somewhere.
But damned if I can find it...

Thanks,
Scott



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.