Follow-up Comment #6, bug #17050 (project freeciv):

Running with valgrind helps to reproduce:

==27360== Invalid read of size 8
==27360==    at 0x5720DB: player_diplstate_get (player.c:276)
==27360==    by 0x47C0C1: package_player_info (plrhand.c:908)
==27360==    by 0x47C40C: send_player_info_c_real (plrhand.c:747)
==27360==    by 0x409545: aifill (srv_main.c:1828)
==27360==    by 0x4676B1: connection_detach (connecthand.c:685)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==  Address 0x6383ff0 is 224 bytes inside a block of size 2,856
free'd
==27360==    at 0x4C270BD: free (vg_replace_malloc.c:366)
==27360==    by 0x5735E2: player_destroy (player.c:628)
==27360==    by 0x47EF9F: server_remove_player (plrhand.c:1210)
==27360==    by 0x4676A6: connection_detach (connecthand.c:684)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==    by 0x403BEE: main (civserver.c:376)
==27360== 
==27360== Invalid read of size 8
==27360==    at 0x5720EC: player_diplstate_get (player.c:278)
==27360==    by 0x47C0C1: package_player_info (plrhand.c:908)
==27360==    by 0x47C40C: send_player_info_c_real (plrhand.c:747)
==27360==    by 0x409545: aifill (srv_main.c:1828)
==27360==    by 0x4676B1: connection_detach (connecthand.c:685)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==  Address 0x6141000 is 0 bytes inside a block of size 1,024 free'd
==27360==    at 0x4C270BD: free (vg_replace_malloc.c:366)
==27360==    by 0x5735DA: player_destroy (player.c:626)
==27360==    by 0x47EF9F: server_remove_player (plrhand.c:1210)
==27360==    by 0x4676A6: connection_detach (connecthand.c:684)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==    by 0x403BEE: main (civserver.c:376)
==27360== 
1: in player_diplstate_get() [player.c::278]: assertion '*diplstate_slot !=
((void *)0)' failed.
1: SVP, rapportez ce bogue à http://gna.org/projects/freeciv/
==27360== Invalid read of size 4
==27360==    at 0x47C0C2: package_player_info (plrhand.c:906)
==27360==    by 0x47C40C: send_player_info_c_real (plrhand.c:747)
==27360==    by 0x409545: aifill (srv_main.c:1828)
==27360==    by 0x4676B1: connection_detach (connecthand.c:685)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==    by 0x403BEE: main (civserver.c:376)
==27360==  Address 0x14 is not stack'd, malloc'd or (recently) free'd
==27360== 
==27360== 
==27360== Process terminating with default action of signal 11 (SIGSEGV)
==27360==  Access not within mapped region at address 0x14
==27360==    at 0x47C0C2: package_player_info (plrhand.c:906)
==27360==    by 0x47C40C: send_player_info_c_real (plrhand.c:747)
==27360==    by 0x409545: aifill (srv_main.c:1828)
==27360==    by 0x4676B1: connection_detach (connecthand.c:685)
==27360==    by 0x41537C: observe_command (stdinhand.c:3145)
==27360==    by 0x417030: handle_stdin_input_real (stdinhand.c:4088)
==27360==    by 0x4C8844: handle_chat_msg_req (handchat.c:343)
==27360==    by 0x473E99: server_handle_packet (hand_gen.c:40)
==27360==    by 0x409CCC: server_packet_input (srv_main.c:1493)
==27360==    by 0x4A6189: server_sniff_all_input (sernet.c:445)
==27360==    by 0x40C114: srv_main (srv_main.c:2532)
==27360==    by 0x403BEE: main (civserver.c:376)
==27360==  If you believe this happened as a result of a stack
==27360==  overflow in your program's main thread (unlikely but
==27360==  possible), you can try to increase the size of the
==27360==  main thread stack using the --main-stacksize= flag.
==27360==  The main thread stack size used in this run was 8388608.
==27360== 
==27360== HEAP SUMMARY:
==27360==     in use at exit: 22,357,975 bytes in 81,833 blocks
==27360==   total heap usage: 308,981 allocs, 227,148 frees, 75,458,466 bytes
allocated
==27360== 
==27360== LEAK SUMMARY:
==27360==    definitely lost: 0 bytes in 0 blocks
==27360==    indirectly lost: 0 bytes in 0 blocks
==27360==      possibly lost: 10 bytes in 1 blocks
==27360==    still reachable: 22,357,965 bytes in 81,832 blocks
==27360==         suppressed: 0 bytes in 0 blocks
==27360== Rerun with --leak-check=full to see details of leaked memory
==27360== 
==27360== For counts of detected and suppressed errors, rerun with: -v
==27360== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 4 from 4)
Erreur de segmentation



    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17050>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to