|
From: Will S. <wil...@vn...> - 2015-10-23 18:41:09
|
Hi Valgrind developers,
I've got an environment (linux/ppc64*) with a stripped libpthread.so.
In this environment, helgrind (and presumably all of it's friends) are
unable to intercept pthread_create@*, and thusly fail to properly track
things. 'nm' is able to see the non-versioned (sans @) reference to the
symbol, so as an experiment I added a hack as seen below, and it seems
to work for this particular environment.
So the questions are.
Do we have any debug hooks that I can quickly tell what other symbols
are not being properly intercepted? At a glance, it looks like some but
not all of the other pthread related symbols are also looking for a
versioned copy of the symbol.
Is this safe to do? / the right thing to do?
Thanks
-Will
---
diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c
index fd53208..02b8a6c 100644
--- a/helgrind/hg_intercepts.c
+++ b/helgrind/hg_intercepts.c
@@ -459,6 +459,11 @@ static int pthread_create_WRK(pthread_t *thread, const pthr
void *(*start) (void *), void *arg) {
return pthread_create_WRK(thread, attr, start, arg);
}
+ PTH_FUNC(int, pthreadZucreateZa, // pthread_create*
+ pthread_t *thread, const pthread_attr_t *attr,
+ void *(*start) (void *), void *arg) {
+ return pthread_create_WRK(thread, attr, start, arg);
+ }
#elif defined(VGO_darwin)
PTH_FUNC(int, pthreadZucreate, // pthread_create
pthread_t *thread, const pthread_attr_t *attr,
|
|
From: John R. <jr...@bi...> - 2015-10-24 00:34:13
|
> I've got an environment (linux/ppc64*) with a stripped libpthread.so. Please tell us about the environment. All the good Linux distributions make available the debug symbols for glibc. You should install the packages which supply the debug symbols for glibc. [libpthread.so is part of glibc.] For instance, on Fedora the package name is glibc-debuginfo; on Debian, libc6-dbg. You should stop using any distribution that does not supply the debug symbols for its libraries. Such a distribution is either incompetent or hostile to developers. [If you don't have enough filesystem space for the symbols, then you have no business complaining. If you yourself stripped the symbols, then re-install glibc and debug symbols, and don't strip the symbols.] > [snip] so as an experiment I added a hack as seen below, and it seems > to work for this particular environment. > [snip] Is this safe to do? / the right thing to do? Safe? Yes. The right thing to do? No. Install the debug symbols! |
|
From: Ivo R. <iv...@iv...> - 2015-10-24 17:57:48
|
2015-10-24 2:34 GMT+02:00 John Reiser <jr...@bi...>: > > > I've got an environment (linux/ppc64*) with a stripped libpthread.so. > > [If you don't have enough filesystem space for the symbols, > then you have no business complaining.] If disk space is a concern here, consider using debuginfo server. See http://valgrind.org/docs/manual/manual-core.html, "--debuginfo-server" clo. I. |