Stockfish vs. VS

Discussion of chess software programming and technical issues.

Moderator: Ras

adamh

Re: BUG FOUND !!!

Post by adamh »

Unfortunately I still get an exception as soon as I reach 2048.

And the bad news is that while struggling to get my 64-bit build in order I must have crossed some wires in the 32-bit build too, so for the moment I cannot debug to see where the 2048-crash is.

I think from now on I will call this crash "the 2048-crash"
The other crash which comes after a while (usually 2hrs sometimes 15 mins), and which could be connected to "sleeping threads" I will call "the threads crash"


Would the included make files create ".pdb"-files wih symbols for the VS debugger?
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: BUG FOUND !!!

Post by mcostalba »

adamh wrote: Would the included make files create ".pdb"-files wih symbols for the VS debugger?
The included Makefile has nothing to do with VS. It is used only by gcc on Linux.
adamh

Re: BUG FOUND !!!

Post by adamh »

Errrrm Marco....

am I totally off here?

Code: Select all

	entries = new ([b]std::nothrow[/b]) TTCluster[size];
	if (!entries)
      {
          std::cerr << "Failed to allocate " << mbSize
                    << " MB for transposition table." << std::endl;
          exit(EXIT_FAILURE);
      }
      clear();
with the nothrow addition we get rid of the exception but instead new [] returns 0 (for hash >= 2048 MB ) so my compile will exit (allocation size being == 0x8000 0000 bytes ). In a 32 bit app that is. Perhaps this is exactly expected?

Anyway I will focus on the thread crash now, I have a hunch that will repro in 32-bit (as my 64- does not fly yet)....
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: BUG FOUND !!!

Post by mcostalba »

adamh wrote:Perhaps this is exactly expected?
Yes it is. You are not able to allocate more memory in a single call to 'new'. This is a library / OS limit, possibly moving to 64 bits _could_ avoid that.