mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 13:17:12 +00:00
Improve CLI error handling a bit
Reduce the number of *easy* ways to hit UB or an uncaught exception. This builds on Sopel's work on FEN validation. Obviously SF is not and will never be a security boundary, but at least we can reduce the number of reports about uncaught `std::stoi` out of range, etc. I also added a gentle fallback to `NumaConfig` specifically because that's something that (as a dev) I frequently set by hand in the CLI, but happy to revert if that's too annoying of a change. closes https://github.com/official-stockfish/Stockfish/pull/6844 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
48a9118251
commit
cd75d31127
+3
-3
@@ -180,9 +180,9 @@ class Position {
|
||||
bool dtz_is_dtm() const; // Pawnless && (3-men || 4-men-minors-only)
|
||||
|
||||
// Position consistency check, for debugging
|
||||
bool pos_is_ok() const;
|
||||
bool material_key_is_ok() const;
|
||||
void flip();
|
||||
bool pos_is_ok() const;
|
||||
bool material_key_is_ok() const;
|
||||
std::optional<PositionSetError> flip();
|
||||
|
||||
StateInfo* state() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user