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

Jason Dorje Short wrote:
> I got this with chris's recent savegame but I have no idea if it's 
> related.  Attached is the previous savegame; no clue if it's reproducable.
It helps pinpoint one of the potential problems from PR#40068 & PR#40069.
Although there doesn't seem to be a trireme....

Presumably, this tells us that the psite->location problem wasn't actually
the contents of ->location, but rather the content of psite still pointing
at freed memory, which now has a bad location in it:

==12774== Invalid read of size 4
==12774==    at 0x80F3978: map_get_player_city (maphand.c:1206)

   struct vision_site *psite = map_get_player_site(ptile, pplayer);

   if (NULL != psite && ptile == psite->location

==12774==  Address 0x5391ca0 is 0 bytes inside a block of size 76 free'd
==12774==    at 0x402365C: free (vg_replace_malloc.c:323)
==12774==    by 0x80E6669: reality_check_city (citytools.c:1792)

       playtile->site = NULL;

Thinking about it....

Freeciv-dev mailing list

Reply via email to