|
From: Mikhail B. <mik...@de...> - 2014-12-11 11:48:16
|
On 12/05/2014 09:26 PM, Philippe Waroquiers wrote: > On Thu, 2014-12-04 at 16:16 +0300, Mikhail Baikov wrote: > >> And the crash... I'm sorry it's not a segfault. It's a crash. >> One of the strange things is that inspite of --run-libc-freeres set no >> in the log appears >> /bin/sh: symbol '__libc_freeres': can't resolve symbol and the rest... > This is I suppose because valgrind has not been properly compiled > for ulibc. > If you look in coregrind/vg_preloaded.c, you will see that if symbol > __UCLIBC__ is defined, then no calls to __libc_freeres(); > will be generated. > So, that looks a first problem to solve : I guess you should > ensure that __UCLIBC__ is defined when you compile on the host, > and ensure to compile with the relevant uclibc headers files at > the host side. > > Yeah. Raising __UCLIBC__ flag (export CFLAGS="-D__UCLIBC__") has helped but it seems to me that this flag will never be raised in normal conditions. Searching this flag among sources I found no place where it's defined. $ grep -R "__UCLIBC__" ./valgrind-3.10.1/* ./valgrind-3.10.1/coregrind/vg_preloaded.c:# if !defined(__UCLIBC__) \ ./valgrind-3.10.1/coregrind/m_debuginfo/minilzo-inl.c:#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) ./valgrind-3.10.1/coregrind/m_debuginfo/lzodefs.h:#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) |