Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13058) player->research points nowhere
Home

[Freeciv-Dev] (PR#13058) player->research points nowhere

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13058) player->research points nowhere
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 14 May 2005 17:06:04 -0700
Reply-to: bugs@xxxxxxxxxxx

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

==9731== Invalid read of size 4
==9731==    at 0x8084B98: package_player_info (plrhand.c:1615)
==9731==    by 0x8084839: send_player_info_c (plrhand.c:1420)
==9731==    by 0x8070AA3: establish_new_connection (connecthand.c:187)
==9731==    by 0x8071135: handle_login_request (connecthand.c:360)
==9731==    by 0x8051D32: handle_packet_input (srv_main.c:946)
==9731==    by 0x80A1AE3: handle_incoming_client_packets (sernet.c:370)
==9731==    by 0x80A1F1C: sniff_packets (sernet.c:686)
==9731==    by 0x80536F4: srv_loop (srv_main.c:1766)
==9731==    by 0x80530E5: srv_main (srv_main.c:1704)
==9731==    by 0x804AB38: main (civserver.c:242)
==9731==  Address 0x1BB42C50 is not stack'd, malloc'd or (recently) free'd

this isn't a NULL dereference or we'd get a crash.  I don't know how it
comes about.

I get this when first connecting to a server.

IMO the player-research thing is rather poorly designed.  merge_research
and clean_research, aside from being really ugly and unconforming, are
quite error-prone.  We should have one research struct per *team* and
then just lookup pplayer->team->research.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13058) player->research points nowhere, Jason Short <=