Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12730) packets code has memory problems
Home

[Freeciv-Dev] Re: (PR#12730) packets code has memory problems

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12730) packets code has memory problems
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Apr 2005 13:50:52 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Per I. Mathisen wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12730 >
> 
> Valgrind sayz:
> 
> ==18666== Conditional jump or move depends on uninitialised value(s)
> ==18666==    at 0xB7918B: (within /usr/lib/libz.so.1.2.1.2)
> ==18666==    by 0xB7A061: (within /usr/lib/libz.so.1.2.1.2)
> ==18666==    by 0xB78505: deflate (in /usr/lib/libz.so.1.2.1.2)
> ==18666==    by 0xB7681A: compress2 (in /usr/lib/libz.so.1.2.1.2)
> ==18666==    by 0x80B254D: send_packet_data (packets.c:165)
> ==18666==    by 0x80B42FB: send_packet_thaw_hint (packets_gen.c:981)
> ==18666==    by 0x80B43A9: lsend_packet_thaw_hint (packets_gen.c:1044)
> ==18666==    by 0x8084170: send_rulesets (ruleset.c:3187)
> 
> ==18662== Conditional jump or move depends on uninitialised value(s)
> ==18662==    at 0xB791D4: (within /usr/lib/libz.so.1.2.1.2)
> ==18662==    by 0xB7A061: (within /usr/lib/libz.so.1.2.1.2)
> ==18662==    by 0xB78505: deflate (in /usr/lib/libz.so.1.2.1.2)
> ==18662==    by 0xB7681A: compress2 (in /usr/lib/libz.so.1.2.1.2)
> ==18662==    by 0x80C2DFD: send_packet_data (packets.c:165)
> ==18662==    by 0x80C4BAB: send_packet_thaw_hint (packets_gen.c:981)
> ==18662==    by 0x80C4C59: lsend_packet_thaw_hint (packets_gen.c:1044)
> ==18662==    by 0x805171A: main_loop (srv_main.c:1562)

This happens when sending unitialized data over the network.  In the old 
network code you'd get "write() call contains uninitialized data", but 
now that it's passed to compress first you get a warning within that 
library.

Fixing it is trivial but tracking it down is hard.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#12730) packets code has memory problems, Jason Short <=