|
From: <an...@cl...> - 2005-08-04 16:41:22
|
> In message <42EA2129.3060005 <at> clarinet.u-strasbg.fr> > Martin André <andre <at> clarinet.u-strasbg.fr> wrote: > >> Hi Dennis, >> >> >At 18:27 27.07.2005, Martin André wrote: >> >>The problem is that running my program using Valgrind makes the >> >>if_indextoname function (declared as extern char *if_indextoname (unsigned >> >>int __ifindex, char *__ifname) __THROW; in net/if.h) return NULL with the >> >>following error in the output: >> >> >> >>==10869== Syscall param ioctl(SIOCGIFNAME) points to unaddressable byte(s) >> >>==10869== at 0x1B9EF114: ioctl (in /lib/tls/libc-2.3.2.so) >> >>==10869== by 0x8048478: main (test.c:14) >> >>==10869== Address 0x2 is not stack"d, malloc"d or (recently) free"d >> > >> >You are passing an invalid parameter to the syscall, thus 0 is returned. >> >Check if the parameters to if_indextoname are valid prior to calling it >> >> Yes I've checked and the arguments I pass if_indextoname are valid. As I >> already said - the call to if_indextoname is part of a program that's >> running as expected (i.e. returning the name of a network interface) >> when not run from within Valgrind. Does that mean that the error is >> inside if_indextoname's implementation? Is it possible to tell Valgrind >> not to examine this syscall? > > This should be fixed now - it was using the value of ifr_index as > the address when trying to test it is was valid. The bug is still present in 2.4.1, but has been fixed in 3.0 release. Thanks. Martin |