michiguel wrote:
One stress test that should always be run is to decrease the value of the arrrays that hold PVs etc (PVSIZE) to 8 or something like that, and ran a match. The engine should never crash even in those conditions. A golden rule to catch bugs is to increase the chances for them to show up during testing.
Miguel
You are right !
I made your suggested test only to discover Stockfish crashes when it reach maximum allowed ply in a position where he is in check.
if (ply >= PLY_MAX - 1)
return evaluate(pos, ei, threadID);
If we are in check we should not be allowed to call evaluate() that must be called from a non-in-check position.
Thanks a lot for your suggestion !
BTW this bug has always been there, since Glaurung ages.
These are the type of bugs that show up once in a long while and are so annoying to catch. I am glad you found this, it is not good to have dormant bugs around.
Fed up with IPP. For something completely different I made a Stockfish 1.5.1 clone -sources only-, as some alternative to all the #$$$*& IPP threads.
Just meant for some fun. It is untested and has played no games. If I forgot credits somewhere or feel I should not have changed any copyright headers in this way, please let me know. The program is not meant yet as a serious fork or anything but of course does need to follow the GPL if any compile is made. In the sources Dancing Dragon replaces Stockfish in most places but I do hope it is clear it is just a Stockfish 1.5.1 derivative.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan