Author: Robert Hyatt
Date: 11:27:38 05/10/04
Go up one level in this thread
On May 10, 2004 at 14:02:39, Eugene Nalimov wrote: >On May 10, 2004 at 13:57:03, Robert Hyatt wrote: > >>On May 09, 2004 at 22:23:47, Eugene Nalimov wrote: >> >>>On May 09, 2004 at 03:58:05, Dieter Buerssner wrote: >>> >>>>I tried to update to newer Nalimov code (with support of the split TBs). Seemed >>>>all easy, but then the program crashed. I had downloaded krppkr and kqppkq to >>>>test. For some reason, I forgot to download the kqqpkq.0.nbb/nbw.emd files. >>>>After the crash, I tried to check integrity with Wilhelm. It did not complain >>>>about the missing files - just said installed/integer. >>>> >>>>In the actual Nalimov code, one error condition seems to be missing. >>>> >>>>/* Probe TB - lower level (not exportable) function */ >>>> >>>>static int TB_FASTCALL TbtProbeTable(int iTb, color side, unsigned indChunk, >>>> unsigned indInChunk) >>>>{ >>>> [...] >>>> /* Now read it from the disk */ >>>> FILE *fp; >>>> size_t cb; >>>> >>>>/* First, check: is necessary file opened? >>>> As files are not thread-safe, lock file */ >>>> Lock(ptbd->m_rglockFiles[side]); >>>> if (ptbd->m_fSplit) { >>>> iExtent = indChunk >> (31 - LOG2_TB_CB_CACHE_CHUNK); >>>> iPhysicalChunk = indChunk - (iExtent << (31 - LOG2_TB_CB_CACHE_CHUNK)); >>>> } else { >>>> iExtent = 0; >>>> iPhysicalChunk = indChunk; >>>> } >>>> fp = ptbd->m_rgfpFiles[side][iExtent]; >>>> if (NULL == fp) { >>>>/* Not - try to open it */ >>>> pszFileName = ptbd->m_rgpchFileName[side][iExtent]; >>>> if (NULL != pszFileName) { >>>> [carefully tries to open the file with all sort of error checks] >>>> } >>>> >>>> [But an else case is missing, and later code assumes, that fp is initialized >>>>correctly. At least this is my understanding of the code. ] >>>> } >>>> [Now using fp, which might be NULL] >>>> >>>>Regards, >>>>Dieter >>> >>>Add "else goto ERROR_LABEL;". I believe that is enough. >>> >>>Will add it to the new code I Bob will release soon. >>> >>>Thanks, >>>Eugene >> >> >>I added it to the code I have already... >> >>Bob > >Fine. Feel free to distribute new code whenever you want. > >Thanks, >Eugene Done. I've been getting requests. New code is in Crafty 19.13 which will be available in about 60 seconds... :)
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.