Skip to content

Commit 8c5ba90

Browse files
author
pb00067
committed
Restore pos_is_ok StateInfo verify with full check enabled
no functional change bench: 4747020
1 parent 8c28c4c commit 8c5ba90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/position.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,12 @@ bool Position::pos_is_ok() const {
13241324
if (p1 != p2 && (pieces(p1) & pieces(p2)))
13251325
assert(0 && "pos_is_ok: Bitboards");
13261326

1327+
StateInfo si = *st;
1328+
ASSERT_ALIGNED(&si, Eval::NNUE::CacheLineSize);
1329+
1330+
set_state();
1331+
if (std::memcmp(&si, st, sizeof(StateInfo)))
1332+
assert(0 && "pos_is_ok: State");
13271333

13281334
for (Piece pc : Pieces)
13291335
if ( pieceCount[pc] != popcount(pieces(color_of(pc), type_of(pc)))

0 commit comments

Comments
 (0)