Skip to content

Conversation

@vondele
Copy link
Member

@vondele vondele commented Jan 3, 2019

this addresses partially issue #1911 in that it documents the command for verifying the md5sum of downloaded tablebase files.

Additionally, a quick check of the file size (the size of each tb file modulo 64 is 16 as pointed out by @syzygy1) has been implemented.

No functional change.

this addresses partially issue official-stockfish#1911 in that it documents the command for verifying the md5sum of downloaded tablebase files.

Additionally, a quick check of the file size (the size of each tb file modulo 64 is 16 as pointed out by @syzygy1) has been implemented.

No functional change.
@mcostalba
Copy link
Contributor

Patch is good for me.

Just a little nitpicking, please keep *mapping together with *baseAddress

        if (statbuf.st_size % 64 != 16)
        {
            std::cerr << "Corrupt tablebase file " << fname << std::endl;
            exit(1);
        }
        *mapping = statbuf.st_size;
        *baseAddress = mmap(nullptr, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);

@snicolet snicolet closed this in bb843a0 Jan 4, 2019
@snicolet
Copy link
Member

snicolet commented Jan 4, 2019

Merged via bb843a0, thanks!

I have also used exit(EXIT_FAILURE) instead of exit(1) everywhere in tbprobe.cpp to follow the style of benchmark.cpp and tt.cpp

joergoster pushed a commit to joergoster/Stockfish-old that referenced this pull request Feb 21, 2019
This addresses partially issue #1911 in that it documents in our
Readme the command that users can use to verifying the md5sum of
their downloaded tablebase files.

Additionally, a quick check of the file size (the size of each
tablebase file modulo 64 is 16 as pointed out by @syzygy1) has been
implemented at launch time in Stockfish.

Closes official-stockfish/Stockfish#1927
and official-stockfish/Stockfish#1911

No functional change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants