eressea / server

Eressea is an automated play-by-mail strategy game server.
https://www.eressea.de/
Other
26 stars 23 forks source link

piracy_cmd error found by valgrind on the preview code #549

Closed ennorehling closed 8 years ago

ennorehling commented 8 years ago

I recently made some changes in this area, and may have introduced something new?

Command: /home/eressea/eressea/git/Debug/eressea/eressea -v1 -t370 -re3 /home/eressea/eressea/git/scripts/run-turn.lua

0 Factions with 1 NMR
Invalid read of size 8
   at 0x4CFA23: getkeyword (order.c:89)
   by 0x439A25: cycle_route (move.c:1130)
   by 0x43CB0C: sail (move.c:2022)
   by 0x43D9C3: move_cmd (move.c:2276)
   by 0x43F300: piracy_cmd (piracy.c:209)
   by 0x43E2E5: move_pirates (move.c:2485)
   by 0x43E6A6: movement (move.c:2600)
   by 0x488F76: process (laws.c:4002)
   by 0x48A1BE: processorders (laws.c:4415)
   by 0x4272DD: tolua_process_orders (bindings.c:545)
   by 0x4E3C471: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0)
   by 0x4E47963: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0)
 Address 0xae4e848 is 8 bytes inside a block of size 24 free'd
   at 0x4C27D4E: free (vg_replace_malloc.c:427)
   by 0x4CFD0C: free_order (order.c:152)
   by 0x4CFDA3: set_order (order.c:173)
   by 0x43F2D1: piracy_cmd (piracy.c:204)
   by 0x43E2E5: move_pirates (move.c:2485)
   by 0x43E6A6: movement (move.c:2600)
   by 0x488F76: process (laws.c:4002)
   by 0x48A1BE: processorders (laws.c:4415)
   by 0x4272DD: tolua_process_orders (bindings.c:545)
   by 0x4E3C471: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0)
   by 0x4E47963: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0)
   by 0x4E3C6B8: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2.so.0.0.0)
ennorehling commented 8 years ago

https://bugs.eressea.de/view.php?id=2233

ennorehling commented 8 years ago

fixed