It's a i386 machine with RHEL 4.
Thanks.
On Thu, Apr 30, 2009 at 6:26 PM, Julian Seward <[email protected]> wrote:
>
> What CPU and what Linux distro is this with?
>
> J
>
> On Thursday 30 April 2009, Allen Lee wrote:
> > Hi,
> >
> > ++++++++++++
> > Here's the version of valgrind and gcc: valgrind 3.4.1 and gcc 3.4.4
> > ++++++++++++
> >
> > I still can't solve the problem. I guess symbol table might be missed
> > because the so file is loaded dynamically.
> > Any advice? Or is there other approach to get the symbol belongs to the
> > addresses in log file.
> > Thanks.
> >
> > On Tue, Apr 28, 2009 at 3:11 PM, Allen Lee <[email protected]>
> wrote:
> > > Hi guys,
> > >
> > > I use valgrind to detect memory-leak of my module C. Application A use
> > > exec to run application B, and then B will load my module C.so
> > > dynamically. Just for test, I add some defects on purpose, following
> the
> > > quick guide in http://valgrind.org/docs/manual/quick-start.html. There
> > > are two errors in the C.so right now. (problem 1: heap block overrun
> and
> > > problem 2: memory leak -- x not freed)
> > > Then, C.so is compiled with the options -O1 and -g.
> > >
> > > Here is the command line of valgrind:
> > > valgrind --log-file=log1 --tool=memcheck --leak-check=full
> > > --read-var-info=yes --trace-children=yes --error-limit=no A
> > >
> > > And ps says
> > > 16497 pts/1 Sl 0:14 valgrind --log-file=log1 --tool=memcheck
> > > --leak-check=full --read-var-info=yes --trace-children=yes
> > > --error-limit=no B
> > >
> > > The defects are caught successfully, but in the log file, it says like
> > > this:
> > >
> > > ==16497==
> > > ==16497== Invalid write of size 4
> > > ==16497== at 0x5FFF336: ???
> > > ==16497== by 0x5FFF541: ???
> > > ==16497== by 0x602994E: ???
> > > ==16497== by 0x832778C: TCFileioManager::loadFileioAdaptor() (in
> > > XXXXX) ...
> > > ...
> > > ==16497== Address 0x5d53d08 is 0 bytes after a block of size 40
> alloc'd
> > > ==16497== at 0x4004A41: malloc (vg_replace_malloc.c:207)
> > > ==16497== by 0x5FFF335: ???
> > > ==16497== by 0x5FFF541: ???
> > > ==16497== by 0x602994E: ???
> > > ==16497== by 0x832778C: TCFileioManager::loadFileioAdaptor() (in
> > > XXXXX)
> > >
> > > Because I don't have the source code of application B. So I don't know
> > > how B load C.so. What I need to do is just put it at specific path so
> > > that B can find it.
> > > It seems like valgrind doesn't know what the symbols are.
> > > Can valgrind load the symbol table of a dynamic loaded library? Or,
> what
> > > option did I miss?
> > >
> > > Thank you.
> > > - Allen
>
>
>
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users