mnm-sys / tezdhar

A fast and unbeatable chess engine written in C
GNU General Public License v3.0
3 stars 1 forks source link

Runtime error with -fsanitize=undefined instrumentation flag #48

Open mnm-sys opened 2 years ago

mnm-sys commented 2 years ago
bitboard.c:265:20: runtime error: left shift of 1804289383 by 15 places cannot be represented in type 'int32_t' (aka 'int')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:265:20 in 
bitboard.c:265:13: runtime error: signed integer overflow: -1804289384 + -1565294592 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:265:13 in 
bitboard.c:267:19: runtime error: left shift of 925583387 by 2 places cannot be represented in type 'int32_t' (aka 'int')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:267:19 in 
bitboard.c:269:12: runtime error: signed integer overflow: 317058575 * 2057 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:269:12 in 
bitboard.c:273:19: runtime error: left shift of 645540165 by 3 places cannot be represented in type 'int32_t' (aka 'int')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:273:19 in 
bitboard.c:275:12: runtime error: signed integer overflow: 1609548891 * 668265261 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitboard.c:275:12 in