Am 08.11.2010 07:33, schrieb Patrick McHardy:
On 08.11.2010 00:43, Oscar Soriano Riera wrote:
...
5) I use Valgrid to see a problem, but valgrid fails, i think
that is a problem with the malloc when it get memory for the
stack:
root@DECT:/usr/src/dectmon# valgrind src/dectmon
==10731==
Memcheck, a memory error detector
==10731== Copyright (C) 2002-2010, and
GNU GPL'd, by Julian Seward et al.
==10731== Using Valgrind-3.6.0 and
LibVEX; rerun with -h for copyright info
==10731== Command:
src/dectmon
==10731==
==10731== Invalid write of size 2
==10731== at
0x408E568: event_set (in /usr/lib/libev.so.3.0.0)
==10731== by
0x804940E: register_fd (event_ops.c:35)
==10731== by 0x4078361:
dect_fd_register (io.c:103)
==10731== by 0x4077C14: dect_netlink_init
(netlink.c:358)
==10731== by 0x405FE5C: dect_open_handle
(libdect.c:66)
==10731== by 0x804CBEB: main (main.c:108)
==10731==
Address 0x41ff7d8 is not stack'd, malloc'd or (recently)
free'd
Thanks, that helps, I'll try to figure out what's wrong.
I think I know what's happening - you've installed libev3, but
are compiling against the libevent headers, which use a different
size for struct event.
Assuming you're running Debian, try installing libev-libevent-dev,
run configure again and rebuild dectmon. I'll try whether this
can be caught by the configure script.