03 Mar, 2010, Kayle wrote in the 1st comment:
Votes: 0
So, I've introduced a memory leak into SW:TSW that I have been trying since yesterday to track down because Valgrind continues to be unhelpful.

==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C28483: memcpy (mc_replace_strmem.c:77)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== —- Attach to debugger ? — [Return/N/n/Y/y/C/c] —- c
==25109==
==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C28498: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C284E5: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C28504: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C2850D: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C28564: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==25109== at 0x5EDCFF5: send (in /lib/libc-2.9.so)
==25109== by 0x535CB6: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1689)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)
==25109== Address 0x761f6a4 is 4 bytes inside a block of size 4,396 alloc'd
==25109== at 0x4C25684: calloc (vg_replace_malloc.c:397)
==25109== by 0x5D172A: compressStart(descriptor_data*) (mccp.cpp:122)
==25109== by 0x534F0C: read_from_buffer(descriptor_data*) (comm.cpp:1406)
==25109== by 0x532E18: game_loop() (comm.cpp:785)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C28489: memcpy (mc_replace_strmem.c:80)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x54C5DA: pager_output(descriptor_data*) (comm.cpp:7047)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C28590: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x54C5DA: pager_output(descriptor_data*) (comm.cpp:7047)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C285BC: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x54C5DA: pager_output(descriptor_data*) (comm.cpp:7047)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C285C4: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x54C5DA: pager_output(descriptor_data*) (comm.cpp:7047)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Use of uninitialised value of size 8
==25109== at 0x4C28615: memcpy (mc_replace_strmem.c:402)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x54C5DA: pager_output(descriptor_data*) (comm.cpp:7047)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109==
==25109== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==25109== at 0x5EDCFF5: send (in /lib/libc-2.9.so)
==25109== by 0x535CB6: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1689)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x54C64B: pager_output(descriptor_data*) (comm.cpp:7057)
==25109== by 0x53310C: game_loop() (comm.cpp:848)
==25109== by 0x53205E: main (comm.cpp:474)
==25109== Address 0x761f6de is 62 bytes inside a block of size 4,396 alloc'd
==25109== at 0x4C25684: calloc (vg_replace_malloc.c:397)
==25109== by 0x5D172A: compressStart(descriptor_data*) (mccp.cpp:122)
==25109== by 0x534F0C: read_from_buffer(descriptor_data*) (comm.cpp:1406)
==25109== by 0x532E18: game_loop() (comm.cpp:785)
==25109== by 0x53205E: main (comm.cpp:474)

So this it what valgrind spits at me as I log in. I've checked each of those lines and everything is initialized properly. An example:

if( d->mccp->out_compress->avail_out )
{
int status = deflate( d->mccp->out_compress, Z_SYNC_FLUSH ); //Complaint here.

if( status != Z_OK )
return false;
}


Valgrind complained about that one, so I changed it to:
if( d->mccp->out_compress->avail_out )
{
int status = 0;
status = deflate( d->mccp->out_compress, Z_SYNC_FLUSH ); //Complaint still here.

if( status != Z_OK )
return false;
}


And yet it still complained about status = deflate. Now this is entirely frustrating because every time a command is used for the first time, like score for instance, I get blasted with several chunks of the same thing over and over. And I can't for the life of me, figure out why. Am I going crazy? Missing something? Or is this something going on in the library commands that I just can't fix?

If anyone wants, I can post all the relevant lines from the valgrind output.
03 Mar, 2010, Runter wrote in the 2nd comment:
Votes: 0
==25109== Conditional jump or move depends on uninitialised value(s)
==25109== at 0x4C28483: memcpy (mc_replace_strmem.c:77)
==25109== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25109== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25109== by 0x535C1B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1677)
==25109== by 0x5357A7: flush_buffer(descriptor_data*, bool) (comm.cpp:1554)
==25109== by 0x53319D: game_loop() (comm.cpp:856)
==25109== by 0x53205E: main (comm.cpp:474)


Well, I don't think those are actually contributing to memory leaking. Not sure about the very last one.

edit: Yeah, sorry. I mean deflate( in here ); :p. I should have said look at the parameters.
03 Mar, 2010, Kayle wrote in the 3rd comment:
Votes: 0
deflate is a library call. it's not anywhere in my code. I think it's part of zlib for mccp.

[Edit:] Oh. missed the word call.

On IMC Davion seemed to think the issue was with d->mccp->out_compress. But I've changed it so that it's being NULL'd in new descriptor initialization and then it gets initialized if the client is using MCCP, but it's not getting rid of any of these. Nothing I change seems to do anything except change the line numbers for the valgrind output.
03 Mar, 2010, Darva wrote in the 4th comment:
Votes: 0
Some of those are problems in the library itself… I think valgrind is supposed to have built in supression rules for those errors… At least, it doesn't show them on the code base i'm working on unless i ask it to, but it shows errors like that that are in code that I actually wrote.
03 Mar, 2010, Runter wrote in the 5th comment:
Votes: 0
Darva said:
Some of those are problems in the library itself… I think valgrind is supposed to have built in supression rules for those errors… At least, it doesn't show them on the code base i'm working on unless i ask it to, but it shows errors like that that are in code that I actually wrote.


It's possible.
03 Mar, 2010, David Haley wrote in the 6th comment:
Votes: 0
What is the value of d->mccp->out_compress when this happens?
03 Mar, 2010, Kayle wrote in the 7th comment:
Votes: 0
Don't know. When I attach GDB from inside valgrind at the issue all I get is:

==25832== Conditional jump or move depends on uninitialised value(s)
==25832== at 0x4C28483: memcpy (mc_replace_strmem.c:77)
==25832== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25832== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25832== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25832== by 0x535C3B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1679)
==25832== by 0x5357C7: flush_buffer(descriptor_data*, bool) (comm.cpp:1556)
==25832== by 0x53319D: game_loop() (comm.cpp:856)
==25832== by 0x53205E: main (comm.cpp:474)
==25832==
==25832== —- Attach to debugger ? — [Return/N/n/Y/y/C/c] —- y
==25832== starting debugger with cmd: /usr/bin/gdb -nw /proc/25851/fd/1014 25851
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"…
Attaching to program: /proc/25851/fd/1014, process 25851
0x0000000004c28483 in ?? ()
(gdb) bt
#0 0x0000000004c28483 in ?? ()
#1 0x0000000007629b98 in ?? ()
#2 0x0000000004e313ba in ?? ()
#3 0x0000000000000000 in ?? ()
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from program: /proc/25851/fd/1014, process 25851
==25832==
==25832== Debugger has detached. Valgrind regains control. We continue.
==25832==
==25832== Conditional jump or move depends on uninitialised value(s)
==25832== at 0x4C28498: memcpy (mc_replace_strmem.c:402)
==25832== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==25832== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==25832== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==25832== by 0x535C3B: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1679)
==25832== by 0x5357C7: flush_buffer(descriptor_data*, bool) (comm.cpp:1556)
==25832== by 0x53319D: game_loop() (comm.cpp:856)
==25832== by 0x53205E: main (comm.cpp:474)
==25832==
==25832== —- Attach to debugger ? — [Return/N/n/Y/y/C/c] —-
04 Mar, 2010, Kayle wrote in the 8th comment:
Votes: 0
So after fiddling with it more after I got back from running errands earlier, I've managed to get no further than getting the line numbers to change but point to the same things. Here's the complete valgrind output from startup to my logging in.

==29043== Memcheck, a memory error detector.
==29043== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==29043== Using LibVEX rev 1884, a library for dynamic binary translation.
==29043== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==29043== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==29043== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==29043==
–29043– Command line
–29043– ../src/swtsw
–29043– 2075
–29043– Startup, with flags:
–29043– –suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
–29043– -v
–29043– –tool=memcheck
–29043– –leak-check=yes
–29043– –show-reachable=yes
–29043– –db-attach=yes
–29043– –num-callers=10
–29043– –track-fds=yes
–29043– –suppressions=../src/vg_suppress.supp
–29043– Contents of /proc/version:
–29043– Linux version 2.6.18.8-x86_64-linode10 (root@build.linode.com) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #1 SMP Tue Nov 10 16:29:17 UTC 2009
–29043– Arch and hwcaps: AMD64, amd64-sse2
–29043– Page sizes: currently 4096, max supported 4096
–29043– Valgrind library directory: /usr/lib/valgrind
–29043– Reading syms from /home/tswdev/src/swtsw (0x400000)
–29043– Reading syms from /lib/ld-2.9.so (0x4000000)
–29043– Reading debug info from /lib/ld-2.9.so ..
–29043– .. CRC mismatch (computed 2aeecd7e wanted a5503f5d)
–29043– object doesn't have a symbol table
–29043– Reading syms from /usr/lib/valgrind/amd64-linux/memcheck (0x38000000)
–29043– object doesn't have a dynamic symbol table
–29043– Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
–29043– Reading suppressions file: ../src/vg_suppress.supp
–29043– Reading suppressions file: /usr/lib/valgrind/default.supp
–29043– Reading syms from /usr/lib/valgrind/amd64-linux/vgpreload_core.so (0x4a21000)
–29043– Reading syms from /usr/lib/valgrind/amd64-linux/vgpreload_memcheck.so (0x4c23000)
–29043– Reading syms from /lib/libz.so.1.2.3.3 (0x4e2c000)
–29043– Reading debug info from /lib/libz.so.1.2.3.3 ..
–29043– .. CRC mismatch (computed 3be6685a wanted a840ee6d)
–29043– object doesn't have a symbol table
–29043– Reading syms from /usr/lib/libmysqlclient.so.15.0.0 (0x5044000)
–29043– Reading debug info from /usr/lib/libmysqlclient.so.15.0.0 ..
–29043– .. CRC mismatch (computed a5933862 wanted 75b8c0fa)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libdl-2.9.so (0x5443000)
–29043– Reading debug info from /lib/libdl-2.9.so ..
–29043– .. CRC mismatch (computed 1c40451f wanted 61caad0a)
–29043– object doesn't have a symbol table
–29043– Reading syms from /usr/lib/libstdc++.so.6.0.11 (0x5647000)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libm-2.9.so (0x5956000)
–29043– Reading debug info from /lib/libm-2.9.so ..
–29043– .. CRC mismatch (computed c14b75b7 wanted 1d0b308f)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libgcc_s.so.1 (0x5bdb000)
–29043– Reading debug info from /lib/libgcc_s.so.1 ..
–29043– .. CRC mismatch (computed 8340a265 wanted e50b492c)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libc-2.9.so (0x5df6000)
–29043– Reading debug info from /lib/libc-2.9.so ..
–29043– .. CRC mismatch (computed bb7f9209 wanted dcd904d7)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libpthread-2.9.so (0x6168000)
–29043– Reading debug info from /lib/libpthread-2.9.so ..
–29043– .. CRC mismatch (computed a3cef8e6 wanted 88c57f17)
–29043– Reading syms from /lib/libcrypt-2.9.so (0x6384000)
–29043– Reading debug info from /lib/libcrypt-2.9.so ..
–29043– .. CRC mismatch (computed 805d0914 wanted 7acbb9a7)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libnsl-2.9.so (0x65bc000)
–29043– Reading debug info from /lib/libnsl-2.9.so ..
–29043– .. CRC mismatch (computed cbde5ecf wanted 617b4061)
–29043– object doesn't have a symbol table
–29043– REDIR: 0x5e77100 (rindex) redirected to 0x4c27c00 (rindex)
–29043– REDIR: 0xffffffffff600000 (???) redirected to 0x3803e293 (vgPlain_amd64_linux_REDIR_FOR_vgettimeofday)
–29043– REDIR: 0xffffffffff600400 (???) redirected to 0x3803e29d (vgPlain_amd64_linux_REDIR_FOR_vtime)
–29043– REDIR: 0x5e76c30 (strlen) redirected to 0x4c28020 (strlen)
–29043– REDIR: 0x5e70200 (free) redirected to 0x4c264e0 (free)
–29043– REDIR: 0x5e72790 (malloc) redirected to 0x4c277e0 (malloc)
–29043– REDIR: 0x5e79fc0 (memcpy) redirected to 0x4c28470 (memcpy)
–29043– REDIR: 0x5e766e0 (strcpy) redirected to 0x4c28080 (strcpy)
–29043– REDIR: 0x5e766a0 (strcmp) redirected to 0x4c28300 (strcmp)
–29043– REDIR: 0x5e7cd00 (strchrnul) redirected to 0x4c28f70 (strchrnul)
–29043– REDIR: 0x5e76d20 (strnlen) redirected to 0x4c27fd0 (strnlen)
–29043– REDIR: 0x5e79680 (mempcpy) redirected to 0x4c28fd0 (mempcpy)
–29043– REDIR: 0x5e764f0 (index) redirected to 0x4c27d20 (index)
–29043– REDIR: 0x5e723f0 (calloc) redirected to 0x4c255b0 (calloc)
Thu Mar 4, 2010 12:16:09 AM EST :: Booting Database
–29043– REDIR: 0x5e76ed0 (strncmp) redirected to 0x4c28280 (strncmp)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Thu Mar 4, 2010 12:16:09 AM EST :: [*****] BOOT: ———————[ Boot Log ]——————–
Thu Mar 4, 2010 12:16:09 AM EST :: Prepping Default SystemData…
–29043– REDIR: 0x570da20 (operator new(unsigned long)) redirected to 0x4c271a0 (operator new(unsigned long))
Thu Mar 4, 2010 12:16:09 AM EST :: Initializing libdl support…
Thu Mar 4, 2010 12:16:09 AM EST :: Verifying existence of login greetings…
Thu Mar 4, 2010 12:16:09 AM EST :: Login greeting located.
Thu Mar 4, 2010 12:16:09 AM EST :: Creating transfer data
Thu Mar 4, 2010 12:16:09 AM EST :: Loading transfer data
Thu Mar 4, 2010 12:16:09 AM EST :: Loading banks…
Thu Mar 4, 2010 12:16:09 AM EST :: Loading commands…
Thu Mar 4, 2010 12:16:10 AM EST :: Loading spec_funs…
Thu Mar 4, 2010 12:16:10 AM EST :: Loading sysdata configuration…
Thu Mar 4, 2010 12:16:10 AM EST :: Initializing MySQL support…
–29043– REDIR: 0x5e76330 (strcat) redirected to 0x4c27de0 (strcat)
–29043– REDIR: 0x5e782f0 (memchr) redirected to 0x4c28420 (memchr)
–29043– REDIR: 0x5e79c90 (stpcpy) redirected to 0x4c28c30 (stpcpy)
–29043– Reading syms from /lib/libnss_files-2.9.so (0x6bd6000)
–29043– Reading debug info from /lib/libnss_files-2.9.so ..
–29043– .. CRC mismatch (computed 26b75196 wanted 09aa01be)
–29043– object doesn't have a symbol table
–29043– REDIR: 0x5e7cbe0 (rawmemchr) redirected to 0x4c28fb0 (rawmemchr)
–29043– REDIR: 0x5e78b50 (memset) redirected to 0x4c28ea0 (memset)
Thu Mar 4, 2010 12:16:10 AM EST :: Connection to mysql database established.
Thu Mar 4, 2010 12:16:10 AM EST :: Loading mud channels…
Thu Mar 4, 2010 12:16:10 AM EST :: Loading socials
Thu Mar 4, 2010 12:16:10 AM EST :: Loading skill table
Thu Mar 4, 2010 12:16:10 AM EST :: Sorting skill table…
Thu Mar 4, 2010 12:16:10 AM EST :: Creating skill table sorted by type…
Thu Mar 4, 2010 12:16:10 AM EST :: Remapping slots to sns
Thu Mar 4, 2010 12:16:10 AM EST :: Loading races
Thu Mar 4, 2010 12:16:11 AM EST :: Loading news data
Thu Mar 4, 2010 12:16:11 AM EST :: Loading liquids
Thu Mar 4, 2010 12:16:11 AM EST :: Loading mixtures
Thu Mar 4, 2010 12:16:11 AM EST :: Loading herb table
Thu Mar 4, 2010 12:16:11 AM EST :: Loading tongues
Thu Mar 4, 2010 12:16:11 AM EST :: Making wizlist
–29043– REDIR: 0x5e78990 (memmove) redirected to 0x4c28f10 (memmove)
Thu Mar 4, 2010 12:16:11 AM EST :: Loading MSSP Data…
Thu Mar 4, 2010 12:16:11 AM EST :: Initializing random number generator
Thu Mar 4, 2010 12:16:11 AM EST :: Setting time and weather.
Thu Mar 4, 2010 12:16:11 AM EST :: Loading holiday chart…
Thu Mar 4, 2010 12:16:11 AM EST :: Loading DNS cache…
–29043– REDIR: 0x5e76e20 (strncat) redirected to 0x4c27ec0 (strncat)
Thu Mar 4, 2010 12:16:11 AM EST :: Assigning gsn's
Thu Mar 4, 2010 12:16:11 AM EST :: Reading in area files…
Thu Mar 4, 2010 12:16:11 AM EST :: limbo.are : Version 1 Vnums: 1 - 299
Thu Mar 4, 2010 12:16:11 AM EST :: omni.are : Version 1 Vnums: 300 - 399
Thu Mar 4, 2010 12:16:11 AM EST :: menari.are : Version 1 Vnums: 500 - 599
Thu Mar 4, 2010 12:16:11 AM EST :: space.are : Version 1 Vnums: 25000 - 27999
Thu Mar 4, 2010 12:16:11 AM EST :: lounge.are : Version 1 Vnums: 20000 - 20099
Thu Mar 4, 2010 12:16:13 AM EST :: academy.are : Version 1 Vnums: 400 - 499
Thu Mar 4, 2010 12:16:13 AM EST :: coruscant.are : Version 1 Vnums: 600 - 799
Thu Mar 4, 2010 12:16:13 AM EST :: Loading buildlist
Thu Mar 4, 2010 12:16:14 AM EST :: Kayle.are : Version 1 Vnums: 90000 - 99999
Thu Mar 4, 2010 12:16:14 AM EST :: Fixing exits
Thu Mar 4, 2010 12:16:14 AM EST :: Counting pfiles…..
Thu Mar 4, 2010 12:16:14 AM EST :: Pfile count completed.
Thu Mar 4, 2010 12:16:14 AM EST :: Total pfiles scanned: 1
Thu Mar 4, 2010 12:16:14 AM EST :: Updating rare item counts…..
Thu Mar 4, 2010 12:16:14 AM EST :: Checking player files….
Thu Mar 4, 2010 12:16:14 AM EST :: Checking corpses….
Thu Mar 4, 2010 12:16:14 AM EST :: Loading corpses
Thu Mar 4, 2010 12:16:14 AM EST :: Loading slay table
Thu Mar 4, 2010 12:16:14 AM EST :: Initializing economy
Thu Mar 4, 2010 12:16:14 AM EST :: Initializing area reset events…
Thu Mar 4, 2010 12:16:15 AM EST :: Loading boards
Thu Mar 4, 2010 12:16:15 AM EST :: Starting board pruning…
Thu Mar 4, 2010 12:16:15 AM EST :: Next board pruning in 24 hours.
Thu Mar 4, 2010 12:16:15 AM EST :: Loading clans
Thu Mar 4, 2010 12:16:15 AM EST :: Loading clans…
Thu Mar 4, 2010 12:16:15 AM EST :: jedi.order
Thu Mar 4, 2010 12:16:15 AM EST :: Storeroom not found
Thu Mar 4, 2010 12:16:15 AM EST :: galactic.republic
Thu Mar 4, 2010 12:16:15 AM EST :: Storeroom not found
Thu Mar 4, 2010 12:16:15 AM EST :: mandalorian.clans
Thu Mar 4, 2010 12:16:15 AM EST :: Storeroom not found
Thu Mar 4, 2010 12:16:15 AM EST :: sith.empire
Thu Mar 4, 2010 12:16:15 AM EST :: Storeroom not found
Thu Mar 4, 2010 12:16:15 AM EST :: exchange.clan
Thu Mar 4, 2010 12:16:15 AM EST :: Storeroom not found
Thu Mar 4, 2010 12:16:15 AM EST :: Done clans
Thu Mar 4, 2010 12:16:15 AM EST :: Loading watches
Thu Mar 4, 2010 12:16:15 AM EST :: Loading bans
Thu Mar 4, 2010 12:16:15 AM EST :: Done.
Thu Mar 4, 2010 12:16:15 AM EST :: Loading reserved names
Thu Mar 4, 2010 12:16:15 AM EST :: Loading Projects
Thu Mar 4, 2010 12:16:15 AM EST :: Loading Changes List
Thu Mar 4, 2010 12:16:15 AM EST :: Loading Space
Thu Mar 4, 2010 12:16:15 AM EST :: Space loaded.
Thu Mar 4, 2010 12:16:15 AM EST :: Initializing socket
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading IMC2 command table…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading IMC2 network data…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading IMC2 help file…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading IMC2 color table…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading IMC2 who template…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: imcfread_word: EOF encountered on read.
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: IMC2 network data loaded.
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: IMC2 Network Initializing…
–29043– REDIR: 0x5e76fa0 (strncpy) redirected to 0x4c28150 (strncpy)
–29043– Reading syms from /lib/libnss_dns-2.9.so (0x75e3000)
–29043– Reading debug info from /lib/libnss_dns-2.9.so ..
–29043– .. CRC mismatch (computed 70f1fde3 wanted 9ce1b570)
–29043– object doesn't have a symbol table
–29043– Reading syms from /lib/libresolv-2.9.so (0x77e9000)
–29043– Reading debug info from /lib/libresolv-2.9.so ..
–29043– .. CRC mismatch (computed d68ddf96 wanted d9c46717)
–29043– object doesn't have a symbol table
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Connecting to server.
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading channels…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:icode as icode
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:igame as game
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:irc as irc
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:inews as inews
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server01:pchat as pchat
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server01:ibuild as ibuild
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:imusic as imusic
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server01:ichat as ichat
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:imudnews as imudnews
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:ifree as ifree
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server01:ievennia as ievennia
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: configured Server02:iRuby as iRuby
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading ban list…
Thu Mar 4, 2010 12:16:15 AM EST :: IMC: Loading ucache data…
Thu Mar 4, 2010 12:16:15 AM EST :: Star Wars: The Sith Wars Dev Port ready on port 2075.
–29043– REDIR: 0x570bad0 (operator delete(void*)) redirected to 0x4c25fe0 (operator delete(void*))
Thu Mar 4, 2010 12:16:16 AM EST :: IMC: SHA-256 Authentication completed.
Thu Mar 4, 2010 12:16:16 AM EST :: IMC: Connected to Server02. Network ID: MudBytes
Thu Mar 4, 2010 12:16:16 AM EST :: Incoming Connection: **.**.***.**, port 4506.
–29043– REDIR: 0x5e72c80 (realloc) redirected to 0x4c27900 (realloc)
Thu Mar 4, 2010 12:16:20 AM EST :: Loading Account: Kayle
Thu Mar 4, 2010 12:16:21 AM EST :: Loading player data for: Kayle (11K)
Thu Mar 4, 2010 12:16:21 AM EST :: Updating area entry for Kayle
==29043== Conditional jump or move depends on uninitialised value(s)
==29043== at 0x4C28483: memcpy (mc_replace_strmem.c:77)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== —- Attach to debugger ? — [Return/N/n/Y/y/C/c] —- y
==29043== starting debugger with cmd: /usr/bin/gdb -nw /proc/29053/fd/1014 29053
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"…
Attaching to program: /proc/29053/fd/1014, process 29053
0x0000000004c28483 in ?? ()
(gdb) bt
#0 0x0000000004c28483 in ?? ()
#1 0x000000000731a9c0 in ?? ()
#2 0x0000000004e313ba in ?? ()
#3 0x0000000000000000 in ?? ()
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from program: /proc/29053/fd/1014, process 29053
==29043==
==29043== Debugger has detached. Valgrind regains control. We continue.
==29043==
==29043== Conditional jump or move depends on uninitialised value(s)
==29043== at 0x4C28498: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== —- Attach to debugger ? — [Return/N/n/Y/y/C/c] —- c
==29043==
==29043== Conditional jump or move depends on uninitialised value(s)
==29043== at 0x4C284E5: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C28504: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C2850D: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C28564: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==29043== at 0x5EDCFF5: send (in /lib/libc-2.9.so)
==29043== by 0x535E47: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1726)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x5332F4: game_loop() (comm.cpp:889)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043== Address 0x7319864 is 4 bytes inside a block of size 4,396 alloc'd
==29043== at 0x4C25684: calloc (vg_replace_malloc.c:397)
==29043== by 0x5D179A: compressStart(descriptor_data*) (mccp.cpp:122)
==29043== by 0x53509D: read_from_buffer(descriptor_data*) (comm.cpp:1443)
==29043== by 0x532F6F: game_loop() (comm.cpp:818)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Conditional jump or move depends on uninitialised value(s)
==29043== at 0x4C28489: memcpy (mc_replace_strmem.c:80)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x54C76B: pager_output(descriptor_data*) (comm.cpp:7084)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Conditional jump or move depends on uninitialised value(s)
==29043== at 0x4C28590: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x54C76B: pager_output(descriptor_data*) (comm.cpp:7084)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C285BC: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x54C76B: pager_output(descriptor_data*) (comm.cpp:7084)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C285C4: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x54C76B: pager_output(descriptor_data*) (comm.cpp:7084)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Use of uninitialised value of size 8
==29043== at 0x4C28615: memcpy (mc_replace_strmem.c:402)
==29043== by 0x4E313B9: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E33156: (within /lib/libz.so.1.2.3.3)
==29043== by 0x4E318EF: deflate (in /lib/libz.so.1.2.3.3)
==29043== by 0x535DAC: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1714)
==29043== by 0x54C76B: pager_output(descriptor_data*) (comm.cpp:7084)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043==
==29043== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==29043== at 0x5EDCFF5: send (in /lib/libc-2.9.so)
==29043== by 0x535E47: write_to_descriptor(descriptor_data*, char const*, int) (comm.cpp:1726)
==29043== by 0x535938: flush_buffer(descriptor_data*, bool) (comm.cpp:1591)
==29043== by 0x54C7DC: pager_output(descriptor_data*) (comm.cpp:7094)
==29043== by 0x533263: game_loop() (comm.cpp:881)
==29043== by 0x5321B5: main (comm.cpp:507)
==29043== Address 0x731989e is 62 bytes inside a block of size 4,396 alloc'd
==29043== at 0x4C25684: calloc (vg_replace_malloc.c:397)
==29043== by 0x5D179A: compressStart(descriptor_data*) (mccp.cpp:122)
==29043== by 0x53509D: read_from_buffer(descriptor_data*) (comm.cpp:1443)
==29043== by 0x532F6F: game_loop() (comm.cpp:818)
==29043== by 0x5321B5: main (comm.cpp:507)
Thu Mar 4, 2010 12:17:53 AM EST :: Kayle returns from beyond the void.


As you can see, I attempted yet again to get gdb to give me information to no avail. So, I'm at a loss here. Anyone have any insight?
04 Mar, 2010, Kayle wrote in the 9th comment:
Votes: 0
Hah. Code might have been helpful.

1714
if( d->mccp->out_compress->avail_out )
{
int status = 0;
status = deflate( d->mccp->out_compress, Z_SYNC_FLUSH ); // Line 1714

if( status != Z_OK )
return false;
}


1726:
if( len > 0 )
{
for( iStart = 0; iStart < len; iStart += nWrite )
{
nBlock = UMIN( len - iStart, 4096 );
nWrite = send( d->descriptor, d->mccp->out_compress_buf + iStart, nBlock, 0 ); //1726

if( nWrite > 0 )
{
update_transfer( 3, nWrite );
mccpsaved -= nWrite;
}


Declarations:
bool write_to_descriptor( DESCRIPTOR_DATA * d, const char *txt, int length )
{
int iStart = 0, nWrite = 0, nBlock = 0, iErr = 0, len = 0;


If anything else is needed ask and I'll get it posted, or pastebin'd or whatever.
04 Mar, 2010, David Haley wrote in the 10th comment:
Votes: 0
If you can't get it to display in valgrind or gdb, I would using print statements (or logs or whatever) to print out its value. (Kind of a long shot, but you never know…)
04 Mar, 2010, Kayle wrote in the 11th comment:
Votes: 0
David Haley said:
If you can't get it to display in valgrind or gdb, I would using print statements (or logs or whatever) to print out its value. (Kind of a long shot, but you never know…)


struct mccp_data
{
z_stream *out_compress;
unsigned char *out_compress_buf;
};


How does one print the value of that?
04 Mar, 2010, Kline wrote in the 12th comment:
Votes: 0
You can at least print the memory register location and size of the allocated object. Should be %x iirc for printing the memory location, size will just be sizeof() as an int or w/e return type on your system. Or try casting it and pray :)
04 Mar, 2010, Kayle wrote in the 13th comment:
Votes: 0
Loaded it up in GDB and tossed a breakpoint on deflate(). Produced this:

Quote
Thu Mar 4, 2010 1:59:48 AM EST :: Incoming Connection: **.***.***.**, port 1075.

Breakpoint 1, 0x00002b0c65674780 in deflate () from /lib/libz.so.1
(gdb) bt
#0 0x00002b0c65674780 in deflate () from /lib/libz.so.1
#1 0x0000000000535eb0 in write_to_descriptor (d=0x109e010,
txt=0x10a3590 "\r\n\033Thu Mar 4, 2010 1:59:48 AM EST :: Incoming Connection: **.***.***.**, port 1075.

Breakpoint 1, 0x00002b0c65674780 in deflate () from /lib/libz.so.1
(gdb) bt
#0 0x00002b0c65674780 in deflate () from /lib/libz.so.1
#1 0x0000000000535eb0 in write_to_descriptor (d=0x109e010,
txt=0x10a3590 "\r\n\033[0;31m+\033[1;30m", '-' <repeats 75 times>, "\033[0;31m+\033[0m\r\n\033[1;30m|\033[0;37m", ' ' <repeats 23 times>, "Input Accepted. Verifying.", ' ' <repeats 26 times>, "\033[1;"…, length=975) at comm.cpp:1718
#2 0x0000000000535a3c in flush_buffer (d=0x109e010, fPrompt=false) at comm.cpp:1595
#3 0x00000000005333f8 in game_loop () at comm.cpp:893
#4 0x00000000005322b9 in main (argc=2, argv=0x7fff4565ae88) at comm.cpp:511
(gdb) frame 1
#1 0x0000000000535eb0 in write_to_descriptor (d=0x109e010,
txt=0x10a3590 "\r\n\033[0;31m+\033[1;30m", '-' <repeats 75 times>, "\033[0;31m+\033[0m\r\n\033[1;30m|\033[0;37m", ' ' <repeats 23 times>, "Input Accepted. Verifying.", ' ' <repeats 26 times>, "\033[1;"…, length=975) at comm.cpp:1718
warning: Source file is more recent than executable.
1718 status = deflate( d->mccp->out_compress, Z_SYNC_FLUSH );
(gdb) print d->mccp->out_compress
$1 = (z_stream *) 0xf8b940
(gdb) print *d->mccp->out_compress
$3 = {
next_in = 0x10a3590 "\r\n\033[0;31m+\033[1;30m", '-' <repeats 75 times>, "\033[0;31m+\033[0m\r\n\033[1;30m|\033[0;37m", ' ' <repeats 23 times>, "Input Accepted. Verifying.", ' ' <repeats 26 times>, "\033[1;"…, avail_in = 975,
total_in = 0, next_out = 0x10a7680 "", avail_out = 4396, total_out = 0, msg = 0x0, state = 0x10a87c0,
zalloc = 0x2b0c65679410, zfree = 0x2b0c65679400, opaque = 0x0, data_type = 2, adler = 1, reserved = 0}[/quote]
THe stuff in the txt field is from a part of the login sequence. Looks like:

[code]+—————————————————————————+
| Input Accepted. Verifying. |
+—————————————————————————+
| Account Found. Loading… |
+—————————————————————————+
| Account loaded. Verification in progress… |
+—————————————————————————+
| Enter Verification code for Account: |
+—————————————————————————+

Password> [/code]

[Edit:] Added derefenced pointer info to the gdb stuffs.
04 Mar, 2010, bbailey wrote in the 14th comment:
Votes: 0
Runter said:
Darva said:
Some of those are problems in the library itself… I think valgrind is supposed to have built in supression rules for those errors… At least, it doesn't show them on the code base i'm working on unless i ask it to, but it shows errors like that that are in code that I actually wrote.


It's possible.


Yeah, valgrind has issues with zlib. One in particular's even made it into the zlib faq.
04 Mar, 2010, Kayle wrote in the 15th comment:
Votes: 0
zlib FAQ said:
Valgrind (or some similar memory access checker) says that deflate is performing a conditional jump that depends on an uninitialized value. Isn't that a bug?

No. That is intentional for performance reasons, and the output of deflate is not affected. This only started showing up recently since zlib 1.2.x uses malloc() by default for allocations, whereas earlier versions used calloc(), which zeros out the allocated memory.


This is exactly my issue. Guess I need to add a suppression for it. I wonder if this one relates to the send call as well…
0.0/15