drbeco / xadreco

Xadreco Chess Engine
GNU General Public License v2.0
10 stars 3 forks source link

Relatório Valgrind - Memory leak #1

Open drbeco opened 9 years ago

drbeco commented 9 years ago
resign
==8885== 
==8885== Process terminating with default action of signal 8 (SIGFPE)
==8885==  Integer divide by zero at address 0x4033103B8
==8885==    at 0x40BF8F: randommove (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x406860: compjoga (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x4015C3: main (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885== 
==8885== HEAP SUMMARY:
==8885==     in use at exit: 868,864 bytes in 17,763 blocks
==8885==   total heap usage: 809,343 allocs, 791,580 frees, 71,342,860 bytes allocated
==8885== 
==8885== LEAK SUMMARY:
==8885==    definitely lost: 827,904 bytes in 17,248 blocks
==8885==    indirectly lost: 21,936 bytes in 457 blocks
==8885==      possibly lost: 0 bytes in 0 blocks
==8885==    still reachable: 19,024 bytes in 58 blocks
==8885==         suppressed: 0 bytes in 0 blocks
==8885== Rerun with --leak-check=full to see details of leaked memory
==8885== 
==8885== For counts of detected and suppressed errors, rerun with: -v
==8885== Use --track-origins=yes to see where uninitialised values come from
==8885== ERROR SUMMARY: 3608 errors from 2 contexts (suppressed: 4 from 4)
Floating point exception
drbeco commented 9 years ago

O início:

beco@raposa:~/Documents/fontes/cpp/xadrez/xadreco/xadrecogit$ valgrind ./xadreco
==8885== Memcheck, a memory error detector
==8885== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==8885== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==8885== Command: ./xadreco
==8885== 
# Xadreco version 5.82 build 20131229.033330, (C) 1998-2014, by Dr. Beco
# Xadreco comes with ABSOLUTELY NO WARRANTY;
# This is free software, and you are welcome to redistribute it # under certain conditions; Please, visit http://www.fsf.org/licenses/gpl.html
# for details.

xboard
feature done=0
feature ping=0 setboard=1 playother=1 san=0 usermove=0 time=0 draw=1 sigint=0 sigterm=1 reuse=0 analyze=1 myname="Xadreco 5.82" variants="normal" colors=0 ics=0 name=0 pause=0 nps=0 debug=1 memory=0 smp=0
feature done=1
drbeco commented 9 years ago

Primeiros lances

go
tellicsnoalias tell mamer gettourney blitz
tellicsnoalias resume
tellicsnoalias seek 2 1 f m
tellicsnoalias seek 5 5 f m
tellicsnoalias seek 10 10 f m
# xboard: go. Xadreco is now white.
move d2d4
e7e5
# xadreco : N.2. Relogio ligado em 2015-07-01 00:47:09
==8885== Conditional jump or move depends on uninitialised value(s)
==8885==    at 0x407248: minimax (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x40647F: compjoga (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x401590: main (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885== 
move d4e5
drbeco commented 9 years ago

Lance 39

move d1d5
# xadreco : N.39. Brancas. Tempo 3.000000s. Acumulado: 57.000000s. Hora: 2015-07-01 00:53:27
go
# xboard: go. Xadreco is now black.
# xadreco : N.39. Brancas. Tempo 107.000000s. Acumulado: 164.000000s. Hora: 2015-07-01 00:55:14
==8885== Conditional jump or move depends on uninitialised value(s)
==8885==    at 0x407248: minimax (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x40647F: compjoga (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885==    by 0x4015C3: main (in /home/beco/Documents/fontes/cpp/xadrez/xadreco/xadrecogit/xadreco)
==8885== 
tellicsnoalias kibitz :(
move b7b5
# xadreco : N.40. Pretas. Tempo 2.000000s. Acumulado: 323.000000s. Hora: 2015-07-01 00:55:16