Do not initialize RootPosition at startup
authorJoona Kiiski <joona.kiiski@gmail.com>
Tue, 26 Jan 2010 18:22:51 +0000 (20:22 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 27 Jan 2010 19:00:28 +0000 (20:00 +0100)
commit32bd6e44f02a8e0c254376ab0791bd82a85d3cfe
tree77143259ce2638ebecdfdb28f91d6b5b6989ac66
parentc83fd08fd4fa91702ef0f727bc777c613524403d
Do not initialize RootPosition at startup

Initializing high-level object at startup is very dangerous,
because low-level snippets are not yet initialized.

For example Position's constructor calls find_checkers() which
calls attackers_to() which depends on various global bitboard arrays
which are not yet initialized. I think we are lucky not to crash.

RootPosition.from_fen(StartPosition); is called immediately after
all initializations are made at uci_main_loop() which is the
correct behaviour

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