Re: [gnet-dev] glibc detected *** free(): invalid pointer



On Monday 06 June 2005 10:35, Siddhartha Jain wrote:

> Getting this weird error. I can only figure out that its coming from
> part of the code that uses the gnet library.
>
>   (snip code)
>
> The function is called with a valid pointer to the payload of a TCP packet.
>
>    (snip gdb)
>
> Any help would be appreciated.

Compile your code with debugging symbols and run it in valgrind (if it hangs 
at startup, make sure you have valgrind 2.4.x or newer). You might want to 
compile a copy of GNet with debugging symbols as well:

  ~/src/gnet-2.x.y % ./configure --prefix=/home/sid/devel --enable-debug=yes
  ~/src/gnet-2.x.y % make
  ~/src/gnet-2.x.y % make install

That installs GNet into /home/sid/devel/lib. That copy would normally not be 
used. To use it, do:

 ~/src/yourcode % export LD_LIBRARY_PATH=/home/sid/devel/lib
 ~/src/yourcode % valgrind --num-callers=10 ./yourprogram

('ldd ./yourprogram' should show that it picks up libgnet-2.0.so 
from /home/sid/devel/lib)

If you find something, please file a bug against the GNet module in 
http://bugzilla.gnome.org

Alternatively, you might be able to supply one of your input packets as data 
in the code, so that we can try to reproduce the problem with the same input 
data you're using.

Cheers
 -Tim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]