|
From: <an...@cl...> - 2005-07-27 16:27:15
|
Hi, I'm trying to track down memory leaks with Valgrind, but I'm experiencing troubles using it. This is my first experience with Valgrind so I'm a little bit lost here. 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 whereas it returns the expected value when running the program alone. I suppressed the error as explained in the manual (so, no error on the output) but the if_indextoname function still returns NULL when the program is launched with Valgrind. How can this be avoided? Thx in advance for your help, Martin |