|
From: Christian P. <tr...@ge...> - 2004-12-08 13:42:17
|
Hi all, I really tried to invoke valgrind with different tools in order to (initial= ly)=20 profile my applications. However, any application in any valgrind argument= =20 combination lets valgrind die with a message like=20 "cannot enable executable stack as shared object requires: Invalid argume= nt" Below is the ouput of one valgrind test: trapni@battousai tests $ valgrind --tool=3Dmemcheck .libs/lt-test-Console =3D=3D20351=3D=3D Memcheck, a memory error detector for x86-linux. =3D=3D20351=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward = et al. =3D=3D20351=3D=3D Using valgrind-2.2.0, a program supervision framework for= x86-linux. =3D=3D20351=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward = et al. =3D=3D20351=3D=3D For more details, rerun with: -v =3D=3D20351=3D=3D =2Elibs/lt-test-Console: error while loading shared libraries: libpthread.s= o.0:=20 cannot enable executable stack as shared object requires: Invalid argument =3D=3D20351=3D=3D Jump to the invalid address stated on the next line =3D=3D20351=3D=3D at 0x796: ??? =3D=3D20351=3D=3D by 0x1B8F00C8: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D by 0x1B8EFB08: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D by 0x1B8E63F4: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D Address 0x796 is not stack'd, malloc'd or (recently) fre= e'd =3D=3D20351=3D=3D =3D=3D20351=3D=3D Process terminating with default action of signal 11 (SIG= SEGV):=20 dumping core =3D=3D20351=3D=3D Access not within mapped region at address 0x796 =3D=3D20351=3D=3D at 0x796: ??? =3D=3D20351=3D=3D by 0x1B8F00C8: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D by 0x1B8EFB08: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D by 0x1B8E63F4: (within /lib/ld-2.3.4.so) =3D=3D20351=3D=3D =3D=3D20351=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 fr= om 0) =3D=3D20351=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks. =3D=3D20351=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated. =3D=3D20351=3D=3D For a detailed leak analysis, rerun with: --leak-check= =3Dyes =3D=3D20351=3D=3D For counts of detected errors, rerun with: -v Segmentation fault trapni@battousai tests $ Can someone help me please? Thanks in advance, Christian Parpart. =2D-=20 Netiquette: http://www.ietf.org/rfc/rfc1855.txt 14:37:55 up 40 days, 7:07, 1 user, load average: 0.00, 0.00, 0.00 |
|
From: Christian P. <tr...@ge...> - 2004-12-18 15:29:25
|
On Wednesday 08 December 2004 2:42 pm, Christian Parpart wrote: > Hi all, > > I really tried to invoke valgrind with different tools in order to > (initially) profile my applications. However, any application in any > valgrind argument combination lets valgrind die with a message like > > "cannot enable executable stack as shared object requires: Invalid > argument" > > Below is the ouput of one valgrind test: > > trapni@battousai tests $ valgrind --tool=3Dmemcheck .libs/lt-test-Console [......] > Segmentation fault > trapni@battousai tests $ > > Can someone help me please? VALGRIND doesn't run on an NPTL-only system. thanks for your help ;-) =2D-=20 Netiquette: http://www.ietf.org/rfc/rfc1855.txt 16:28:21 up 50 days, 8:58, 0 users, load average: 0.01, 0.02, 0.00 |
Dnia sob 18. grudzie=F1 2004 16:29, Christian Parpart napisa=B3: > VALGRIND doesn't run on an NPTL-only system. thanks for your help ;-) Huh? AFAIR it does since half a year or more...=20 rgds --=20 Sebastian Kaliszewski |
|
From: Tom H. <th...@cy...> - 2004-12-18 18:23:15
|
In message <200...@ge...>
Christian Parpart <tr...@ge...> wrote:
> On Wednesday 08 December 2004 2:42 pm, Christian Parpart wrote:
>
> > I really tried to invoke valgrind with different tools in order to
> > (initially) profile my applications. However, any application in any
> > valgrind argument combination lets valgrind die with a message like
> >
> > "cannot enable executable stack as shared object requires: Invalid
> > argument"
> >
> > Below is the ouput of one valgrind test:
> >
> > trapni@battousai tests $ valgrind --tool=memcheck .libs/lt-test-Console
> [......]
> > Segmentation fault
> > trapni@battousai tests $
> >
> > Can someone help me please?
>
> VALGRIND doesn't run on an NPTL-only system. thanks for your help ;-)
I know of no reason why it shouldn't. We have supported NPTL for some
time now - in fact NPTL itself was never really the problem, the problem
was the change in the TLS model.
I don't see what executable stacks has to do with NPTL anyway?
That executable stack issue looks like a dynamic linker problem
anyway - why is the dynamic linker reporting EINVAL trying to load
a library that needs an executable stack?
I have to say I;m not sure offhand why the linker has decided
that libpthread.so needs an executable stack so I'll have to
look at that - it may just be that it pulls in some assembly
code that hasn't been properly tagged.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Christian P. <tr...@ge...> - 2004-12-19 12:46:51
|
On Saturday 18 December 2004 7:23 pm, Tom Hughes wrote: > In message <200...@ge...> > > Christian Parpart <tr...@ge...> wrote: > > On Wednesday 08 December 2004 2:42 pm, Christian Parpart wrote: > > > I really tried to invoke valgrind with different tools in order to > > > (initially) profile my applications. However, any application in any > > > valgrind argument combination lets valgrind die with a message like > > > > > > "cannot enable executable stack as shared object requires: Invalid > > > argument" > > > > > > Below is the ouput of one valgrind test: > > > > > > trapni@battousai tests $ valgrind --tool=3Dmemcheck .libs/lt-test-Con= sole > > > > [......] > > > > > Segmentation fault > > > trapni@battousai tests $ > > > > > > Can someone help me please? > > > > VALGRIND doesn't run on an NPTL-only system. thanks for your help ;-) > > I know of no reason why it shouldn't. We have supported NPTL for some > time now - in fact NPTL itself was never really the problem, the problem > was the change in the TLS model. > > I don't see what executable stacks has to do with NPTL anyway? > > That executable stack issue looks like a dynamic linker problem > anyway - why is the dynamic linker reporting EINVAL trying to load > a library that needs an executable stack? > > I have to say I;m not sure offhand why the linker has decided > that libpthread.so needs an executable stack so I'll have to > look at that - it may just be that it pulls in some assembly > code that hasn't been properly tagged. Have a look at [1], but griffon26 should have already sent this to your dev= =20 list already. What duo think about it? Regards, Christian Parpart. [1] http://dev.gentoo.org/~griffon26/valgrind-2.2.0-noexecstack.patch =2D-=20 Netiquette: http://www.ietf.org/rfc/rfc1855.txt 13:45:03 up 51 days, 6:15, 1 user, load average: 0.17, 0.06, 0.01 |
|
From: Tom H. <th...@cy...> - 2004-12-19 13:03:11
|
In message <200...@ge...>
Christian Parpart <tr...@ge...> wrote:
> On Saturday 18 December 2004 7:23 pm, Tom Hughes wrote:
>
> > I have to say I;m not sure offhand why the linker has decided
> > that libpthread.so needs an executable stack so I'll have to
> > look at that - it may just be that it pulls in some assembly
> > code that hasn't been properly tagged.
>
> Have a look at [1], but griffon26 should have already sent this to your dev
> list already.
He did.
> What duo think about it?
It's completely wrong. It just asserts that the library doesn't need
an executable stack without trying to work out why the linker thinks
it does - if the linker is right then you're going to wind up dying
when something tries to execute on the stack.
This is all supposed to be automatic - if the compiler generates code
that needs an executable stack (such as nested functions) then it marks
the object file. The linker then marks the resulting libraries and
executables based on the object files that are linked in. The dynamic
loaded then does the necessary at run time based on the code that you
are trying to run.
So there are two questions here - why does the linker think an
executable stack is needed, and why is the system refusing to
provide one when it is asked for.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Christian P. <tr...@ge...> - 2004-12-19 13:51:56
|
On Sunday 19 December 2004 2:03 pm, Tom Hughes wrote: > In message <200...@ge...> > So there are two questions here - why does the linker think an > executable stack is needed, and why is the system refusing to > provide one when it is asked for. Could you please CC me, when you found a solution on it? Regards, Christian Parpart. =2D-=20 Netiquette: http://www.ietf.org/rfc/rfc1855.txt 14:50:20 up 51 days, 7:20, 1 user, load average: 0.07, 0.05, 0.01 |