|
From: Anuta M. <man...@gm...> - 2016-02-24 06:30:06
|
Hi,
A few updates. I wrote a wrapper for a simple function in my client code
and that ran perfectly. However, my pthread_create wrapper still fails with
the following errors:
*--24067-- VG_USERREQ__CLIENT_CALL2: func=0x0--24067--
VG_USERREQ__CLIENT_CALL1: func=0x0Unexpected error.==24067== ==24067==
Process terminating with default action of signal 6 (SIGABRT)==24067==
at 0x5082267: raise (raise.c:55)==24067== by 0x5083EC9: abort
(abort.c:89)==24067== by 0x507B03C: __assert_fail_base
(assert.c:92)==24067== by 0x507B0F1: __assert_fail
(assert.c:101)==24067== by 0x4E376EF: pthread_create@@GLIBC_2.2.5
(allocatestack.c:591)==24067== by 0x400737: main (prog.c:18)==24067==
Aborted (core dumped)*
---------------------------------------------------------------------------------------------------------------------------------------
It is failing at prog.c:18 which is the pthread_create statement.
This is my wrapper code:
----------------------------------------------------------------------------------------------------------------------------------------
*int
I_WRAP_SONAME_FNNAME_ZZ(libpthreadZdsoZd0,pthreadZucreateZAZa)(pthread_t
*thread,const pthread_attr_t *attr,void* (*start),void *arg){ int ret;
OrigFn fn; VALGRIND_GET_ORIG_FN(fn);
CALL_FN_W_WWWW(ret,fn,thread,attr,start,arg); printf("\nPthread wrapper
just got called!\n"); return ret;}*
On Tue, Feb 23, 2016 at 2:28 PM, Anuta Mukherjee <man...@gm...> wrote:
> Hi Ivo,
>
> My tool was listed in:
> 1) configure.ac : AC_OUTPUT
> 2) Makefile.am : TOOLS
>
> I added the ones you mentioned - still the same error!
>
> I should mention : I was able to run my tool perfectly before I added
> another file with the wrapper (and changed my Makefile)
>
> On Tue, Feb 23, 2016 at 12:23 PM, Ivo Raisr <iv...@iv...> wrote:
>
>>
>>
>> 2016-02-23 5:02 GMT+00:00 Anuta Mukherjee <man...@gm...>:
>>
>>> Hi,
>>>
>>> I think I've found the problem. This is my output when I run the above
>>> commands:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *anuta@anuta-ubuntu:/valgrind/valgrind-3.11.0$ nm
>>> inst/lib/valgrind/vgpreload_helgrind-amd64-linux.so|grep -i
>>> pthreadZucreate000000000000b84f T
>>> _vgw00000ZZ_libpthreadZdsoZd0_pthreadZucreateZAZaanuta@anuta-ubuntu:/valgrind/valgrind-3.11.0$
>>> nm inst/lib/valgrind/vgpreload_tracker-amd64-linux.so|grep -i
>>> pthreadZucreatenm: 'inst/lib/valgrind/vgpreload_tracker-amd64-linux.so': No
>>> such file*
>>>
>>> My tool's preload file isn't in the inst/lib/valgrind directory at all.
>>> How do I fix this? My Makefile is exactly the same as Helgrind's, and I ran
>>> autogen, configure, make and make install as well.
>>>
>>
>> Just to make sure that you listed your tool (tracker) in:
>> 1) configure.ac, AC_CONFIG_FILES
>> 2) top-level Makefile.am, SUBDIRS
>>
>> I.
>>
>
>
>
> --
> Anuta Mukherjee,
> Dept of Computer Science Engg,
> CEG, Anna University
>
--
Anuta Mukherjee,
Dept of Computer Science Engg,
CEG, Anna University
|