チケット #48300

Autoattack: Invalid memory read

登録: 2023-06-27 08:15 最終更新: 2023-07-22 05:16

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
3

詳細

Valgrind about S3_2 autogame. Autoattack was enabled on that game (like the unit_survive_autoattack() in the backtrace likely reveals)

==1536407== Invalid read of size 4
==1536407==    at 0x231F2A: occupy_move.part.0 (unithand.c:509)
==1536407==    by 0x234C0B: occupy_move (unithand.c:497)
==1536407==    by 0x234C0B: do_attack (unithand.c:5157)
==1536407==    by 0x23D799: unit_perform_action (unithand.c:3859)
==1536407==    by 0x1C52CE: action_auto_perf_unit_do (actiontools.c:1064)
==1536407==    by 0x17A7C8: unit_survive_autoattack (unittools.c:3443)
==1536407==    by 0x17A7C8: unit_move (unittools.c:4254)
==1536407==    by 0x23CA81: unit_do_regular_move (unithand.c:5485)
==1536407==    by 0x23CA81: unit_perform_action (unithand.c:3909)
==1536407==    by 0x23EF4A: unit_do_action (unithand.c:3272)
==1536407==    by 0x297BCB: dai_unit_move (aitools.c:1273)
==1536407==    by 0x18874A: adv_unit_execute_path (advgoto.c:126)
==1536407==    by 0x2B355E: dai_military_rampage (daiunit.c:614)
==1536407==    by 0x2B6C8A: dai_military_attack (daiunit.c:1763)
==1536407==    by 0x2B86C9: dai_manage_military (daiunit.c:2547)
==1536407==    by 0x2BA418: dai_manage_unit (daiunit.c:2710)
==1536407==    by 0x2BCEFF: dai_manage_units (daiunit.c:2858)
==1536407==    by 0x29192D: dai_do_first_activities (aihand.c:756)
==1536407==    by 0x23FBC2: cai_do_first_activities (classicai.c:447)
==1536407==    by 0x16033C: ai_start_phase (srv_main.c:1096)
==1536407==    by 0x16033C: begin_phase (srv_main.c:1346)
==1536407==    by 0x16033C: srv_running (srv_main.c:2888)
==1536407==    by 0x16033C: srv_main (srv_main.c:3541)
==1536407==    by 0x153F7D: main (civserver.c:388)
==1536407==  Address 0xd5ce188 is 72 bytes inside a block of size 336 free'd
==1536407==    at 0x484317B: free (vg_replace_malloc.c:872)
==1536407==    by 0x3F0A31: unit_virtual_destroy (unit.c:1703)
==1536407==    by 0x1780E4: server_remove_unit_full (unittools.c:1928)
==1536407==    by 0x17B7CF: wipe_unit_full (unittools.c:2072)
==1536407==    by 0x17CA00: wipe_unit (unittools.c:2191)
==1536407==    by 0x17CA00: kill_unit (unittools.c:2378)
==1536407==    by 0x234530: do_attack (unithand.c:5132)
==1536407==    by 0x23D799: unit_perform_action (unithand.c:3859)
==1536407==    by 0x1C52CE: action_auto_perf_unit_do (actiontools.c:1064)
==1536407==    by 0x17A7C8: unit_survive_autoattack (unittools.c:3443)
==1536407==    by 0x17A7C8: unit_move (unittools.c:4254)
==1536407==    by 0x23CA81: unit_do_regular_move (unithand.c:5485)
==1536407==    by 0x23CA81: unit_perform_action (unithand.c:3909)
==1536407==    by 0x1C5197: action_auto_perf_unit_do (actiontools.c:1051)
==1536407==    by 0x231F19: occupy_move.part.0 (unithand.c:505)
==1536407==    by 0x234C0B: occupy_move (unithand.c:497)
==1536407==    by 0x234C0B: do_attack (unithand.c:5157)
==1536407==    by 0x23D799: unit_perform_action (unithand.c:3859)
==1536407==    by 0x1C52CE: action_auto_perf_unit_do (actiontools.c:1064)
==1536407==    by 0x17A7C8: unit_survive_autoattack (unittools.c:3443)
==1536407==    by 0x17A7C8: unit_move (unittools.c:4254)
==1536407==    by 0x23CA81: unit_do_regular_move (unithand.c:5485)
==1536407==    by 0x23CA81: unit_perform_action (unithand.c:3909)
==1536407==    by 0x23EF4A: unit_do_action (unithand.c:3272)
==1536407==    by 0x297BCB: dai_unit_move (aitools.c:1273)
==1536407==    by 0x18874A: adv_unit_execute_path (advgoto.c:126)
==1536407==    by 0x2B355E: dai_military_rampage (daiunit.c:614)
==1536407==    by 0x2B6C8A: dai_military_attack (daiunit.c:1763)
==1536407==    by 0x2B86C9: dai_manage_military (daiunit.c:2547)
==1536407==    by 0x2BA418: dai_manage_unit (daiunit.c:2710)
==1536407==    by 0x2BCEFF: dai_manage_units (daiunit.c:2858)
==1536407==  Block was alloc'd at
==1536407==    at 0x48455EF: calloc (vg_replace_malloc.c:1328)
==1536407==    by 0x4020A9: fc_real_malloc (mem.c:89)
==1536407==    by 0x4020A9: fc_real_calloc (mem.c:138)
==1536407==    by 0x3EEFEB: unit_virtual_create (unit.c:1574)
==1536407==    by 0x17722A: unit_virtual_prepare (unittools.c:1725)
==1536407==    by 0x181365: unit_change_owner (unittools.c:2262)
==1536407==    by 0x28188F: diplomat_bribe (diplomats.c:712)
==1536407==    by 0x23CF65: unit_perform_action (unithand.c:3629)
==1536407==    by 0x23EF4A: unit_do_action (unithand.c:3272)
==1536407==    by 0x2C834F: dai_diplomat_bribe_nearby (aidiplomat.c:690)
==1536407==    by 0x2C834F: dai_manage_diplomat (aidiplomat.c:739)
==1536407==    by 0x2BA271: dai_manage_unit (daiunit.c:2667)
==1536407==    by 0x2BCEFF: dai_manage_units (daiunit.c:2858)
==1536407==    by 0x29192D: dai_do_first_activities (aihand.c:756)
==1536407==    by 0x23FBC2: cai_do_first_activities (classicai.c:447)
==1536407==    by 0x16033C: ai_start_phase (srv_main.c:1096)
==1536407==    by 0x16033C: begin_phase (srv_main.c:1346)
==1536407==    by 0x16033C: srv_running (srv_main.c:2888)
==1536407==    by 0x16033C: srv_main (srv_main.c:3541)
==1536407==    by 0x153F7D: main (civserver.c:388)

チケットの履歴 (6 件中 3 件表示)

2023-06-27 08:15 更新者: cazfi
  • 新しいチケット "Autoattack: Invalid memory read" が作成されました
2023-07-18 23:30 更新者: cazfi
  • 解決法なし から 受領 に更新されました
  • マイルストーン(未割り当て) から 3.0.9 (完了済み) に更新されました
  • コンポーネント(未割り当て) から Server に更新されました
  • 担当者(未割り当て) から cazfi に更新されました
2023-07-22 05:16 更新者: cazfi
  • 解決法受領 から 修正済み に更新されました
  • 状況オープン から 完了 に更新されました

編集

このチケットにコメントを追加するには、ログインが必要です » ログインする