And here's what gdb gives me:This is a problem with Ubuntu or rather the C libraries. The newgame routine does
POSITION->DYN = POSITION->DYN_ROOT;
but then 1 is subtracted from it later in the immediate evaluation from the bitboards. The stack should underflow, but some Linux have alternative memory management to prevent it from crashing.
Code: Select all
Thread debugging using libthread_db enabled]
IvanHoe-Beta verzione 999973-Beta
compiled with PREFETCH
Capitalist multicore mode compiled
Program received signal SIGSEGV, Segmentation fault.
Eval (POSITION=0xa2d460, min=-2147418112, max=2147418112, move=<value optimized out>) at evaluation.c:677
677 positional = (POSITION->DYN - 1)->positional_valu;
(gdb) p POSITION->DYN$1 = (typeDYNAMIC *) 0x7ffff7fd7010
(gdb) p POSITION->DYN_ROOT
$2 = (typeDYNAMIC *) 0x7ffff7fd7010
(gdb) bt
#0 Eval (POSITION=0xa2d460, min=-2147418112, max=2147418112, move=<value optimized out>) at evaluation.c:677
#1 0x0000000000405f1c in InitBitboards (POSITION=0xa2d460) at utility.c:154
#2 0x000000000040655e in NewGame (POSITION=0xa2d460, full=1 '\001') at utility.c:308
#3 0x0000000000401e97 in main () at main.c:98
(gdb) info threads
1 Thread 0x7ffff7fca6f0 (LWP 31977) Eval (POSITION=0xa2d460, min=-2147418112, max=2147418112, move=<value optimized out>)
at evaluation.c:677
(gdb)