|
From: Christopher T. <ctr...@no...> - 2005-03-09 14:55:16
|
Hi all,
I'm working on a project that recently building our executables with an
indirect loader utility ("rtldi"
http://www.bitwagon.com/rtldi/rtldi.html) instead of using ld-linux.so.2
directly. One of the unfortunate consequences of this is that valgrind
no longer works with those executables (more specifically the program
segfaults).
I'm wondering if anyone has used valgrind with rtldi and if so, what
sort of tweaking was required. The only interesting output I get is an
invalid read, and the segfault. However, the same program works in
valgrind without the rtldi loader, and runs fine with the rtldi loader
outside of valgrind... any thoughts would be appreciated...
Thanks,
Chris
==31395==
==31395== Invalid read of size 1
==31395== at 0x1B8E414B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E464F: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E478B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E4C6C: (within /projects/images/bin/rtldi)
==31395== Address 0x114CC is not stack'd, malloc'd or (recently) free'd
==31395==
==31395== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==31395== Access not within mapped region at address 0x114CC
==31395== at 0x1B8E414B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E464F: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E478B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E4C6C: (within /projects/images/bin/rtldi)
==31395==
==31395== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==31395==
==31395== 1 errors in context 1 of 1:
==31395== Invalid read of size 1
==31395== at 0x1B8E414B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E464F: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E478B: (within /projects/images/bin/rtldi)
==31395== by 0x1B8E4C6C: (within /projects/images/bin/rtldi)
==31395== Address 0x114CC is not stack'd, malloc'd or (recently) free'd
==31395== IN SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==31395==
==31395== malloc/free: in use at exit: 0 bytes in 0 blocks.
==31395== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==31395==
==31395== No malloc'd blocks -- no leaks are possible.
--31395-- TT/TC: 0 tc sectors discarded.
--31395-- 51 tt_fast misses.
--31395-- translate: new 51 (607 -> 9095; ratio 149:10)
--31395-- discard 0 (0 -> 0; ratio 0:10).
--31395-- chainings: 20 chainings, 0 unchainings.
--31395-- dispatch: 308 jumps (bb entries); of them 51 (16%) unchained.
--31395-- 1/52 major/minor sched events.
--31395-- reg-alloc: 4 t-req-spill, 1654+14 orig+spill uis,
--31395-- 225 total-reg-rank
--31395-- sanity: 2 cheap, 1 expensive checks.
--31395-- ccalls: 160 C calls, 59% saves+restores avoided (564 bytes)
--31395-- 213 args, avg 0.84 setup instrs each (64 bytes)
--31395-- 0% clear the stack (480 bytes)
--31395-- 50 retvals, 18% of reg-reg movs avoided (18 bytes)
Segmentation fault
$
--
"Kant tells us always to treat human beings as an end
in themselves, and never as network addressable resources."
|
|
From: Nicholas N. <nj...@cs...> - 2005-03-09 15:04:25
|
On Wed, 9 Mar 2005, Christopher Travers wrote:
> I'm working on a project that recently building our executables with an
> indirect loader utility ("rtldi" http://www.bitwagon.com/rtldi/rtldi.html)
> instead of using ld-linux.so.2 directly. One of the unfortunate consequences
> of this is that valgrind no longer works with those executables (more
> specifically the program segfaults).
>
> I'm wondering if anyone has used valgrind with rtldi and if so, what sort of
> tweaking was required. The only interesting output I get is an invalid read,
> and the segfault. However, the same program works in valgrind without the
> rtldi loader, and runs fine with the rtldi loader outside of valgrind... any
> thoughts would be appreciated...
>
> ==31395== Invalid read of size 1
> ==31395== at 0x1B8E414B: (within /projects/images/bin/rtldi)
> ==31395== by 0x1B8E464F: (within /projects/images/bin/rtldi)
> ==31395== by 0x1B8E478B: (within /projects/images/bin/rtldi)
> ==31395== by 0x1B8E4C6C: (within /projects/images/bin/rtldi)
> ==31395== Address 0x114CC is not stack'd, malloc'd or (recently) free'd
I can't give you any specific advice about rtldi, but if you recompile it
with debugging info (-g) you'll get much more informative stack traces,
which may help identify the problem.
N
|