Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12443) memory leaks in CM
Home

[Freeciv-Dev] (PR#12443) memory leaks in CM

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12443) memory leaks in CM
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Mar 2005 14:14:04 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12443 >

This fix causes memory errors:

 ==4268== Invalid read of size 4
==4268==    at 0x811D4D3: clean_lattice (cm.c:1061)
==4268==    by 0x811D65C: init_tile_lattice (cm.c:1128)
==4268==    by 0x811E3C1: cm_init_state (cm.c:1680)
==4268==    by 0x811E732: cm_query_result (cm.c:1796)
==4268==    by 0x806A314: auto_arrange_workers (cityturn.c:242)
==4268==    by 0x8067463: create_city (citytools.c:979)
==4268==    by 0x809F882: city_build (unithand.c:483)
==4268==    by 0x809B0F2: ai_do_build_city (settlers.c:73)
==4268==    by 0x809D195: auto_settler_findwork (settlers.c:1066)
==4268==    by 0x809D7C8: auto_settlers_player (settlers.c:1285)
==4268==    by 0x805025F: end_phase (srv_main.c:611)
==4268==    by 0x8051D03: main_loop (srv_main.c:1607)
==4268==    by 0x8051DF4: srv_main (srv_main.c:1685)
==4268==    by 0x804A638: main (civserver.c:242)
==4268==  Address 0x1BEE5688 is 80 bytes inside a block of size 84 free'd
==4268==    at 0x1B907460: free (vg_replace_malloc.c:153)
==4268==    by 0x811D513: clean_lattice (cm.c:1049)
==4268==    by 0x811D65C: init_tile_lattice (cm.c:1128)
==4268==    by 0x811E3C1: cm_init_state (cm.c:1680)
==4268==    by 0x811E732: cm_query_result (cm.c:1796)
==4268==    by 0x806A314: auto_arrange_workers (cityturn.c:242)
==4268==    by 0x8067463: create_city (citytools.c:979)
==4268==    by 0x809F882: city_build (unithand.c:483)
==4268==    by 0x809B0F2: ai_do_build_city (settlers.c:73)
==4268==    by 0x809D195: auto_settler_findwork (settlers.c:1066)
==4268==    by 0x809D7C8: auto_settlers_player (settlers.c:1285)
==4268==    by 0x805025F: end_phase (srv_main.c:611)
==4268==    by 0x8051D03: main_loop (srv_main.c:1607)
==4268==    by 0x8051DF4: srv_main (srv_main.c:1685)
==4268==    by 0x804A638: main (civserver.c:242)

This is in the development branch.

-jason




[Prev in Thread] Current Thread [Next in Thread]