]> git.sesse.net Git - stockfish/commit
Fix a subtle bug due to the StateInfo pointer became stale
authorMarco Costalba <mcostalba@gmail.com>
Mon, 23 Feb 2009 17:46:33 +0000 (18:46 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Feb 2009 20:45:12 +0000 (21:45 +0100)
commit55f9afee2a079b2dd0b1aeda41082c58eb317ca3
tree38b95fc9c957dc78a1ad881fe3cd53443541602c
parent962216440c186d067d8946112acab847ccb7249f
Fix a subtle bug due to the StateInfo pointer became stale

There was one occurence when the StateInfo variable went
out of scope before the corresponding Position object.

This yelds to a crash. Bug was not hit before because occurs
only when using an UCI interface and not the usual benchmark.

The fix consists in copying internally the content of the
about to stale StateInfo.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
src/position.h
src/uci.cpp