vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I wrote a small C++ program, compiled it with aCC. The program aborts with the following error: /usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/libCsup_v2.2 /usr/lib/dld.sl: Permission denied Abort(coredump) The permissions of libCsup_v2.2 are -rw-rw-rw- 1 bea bea 217088 Sep 25 2002 /usr/lib/libCsup_v2.2 Is the executable flag required for memory mapping ? If yes why ? Does it mean libCsup_v2.2 was wrong installed ? Where do I find a description of this library ? Enough questions ;-) for now. |
| |||
| Hello ! gelbeiche wrote: > /usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/libCsup_v2.2 > /usr/lib/dld.sl: Permission denied > Abort(coredump) Do you have tusc installed ? - Its a very good tool to debug such problems. It is available from the HPUX software porting centre. > The permissions of libCsup_v2.2 are > -rw-rw-rw- 1 bea bea 217088 Sep 25 2002 /usr/lib/libCsup_v2.2 > > Is the executable flag required for memory mapping ? I am not shure. But why don't try it ? > If yes why ? > Does it mean libCsup_v2.2 was wrong installed ? You don't need write permisions to everyone ! Lars |
| |||
| gelbeiche wrote: > I wrote a small C++ program, compiled it with aCC. > The program aborts with the following error: > > /usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/libCsup_v2.2 > /usr/lib/dld.sl: Permission denied > Abort(coredump) > > The permissions of libCsup_v2.2 are > -rw-rw-rw- 1 bea bea 217088 Sep 25 2002 /usr/lib/libCsup_v2.2 > > Is the executable flag required for memory mapping ? > If yes why ? Given that this is a Shared Library, and dld was trying to map at least part of it as TEXT (from above), I have to assume that if you tusc this, you'll see that the mapping was done with PROT_EXECUTE (as you'd expect for a shared library text segment). And yes, if you map with PROT_EXECUTE the underlying file must be executable from the point of view of the file system. As to why -- well, why would you want to let people arbitrarily map in binaries and execute them when they don't have executable permission on the underlying file in the first place? > Does it mean libCsup_v2.2 was wrong installed ? I would imagine so -- it certainly shows as -r-xr-xr-x on the systems I have access to. > Where do I find a description of this library ? http://docs.hp.com/en/5185-4304/ch13s06.html Don > > Enough questions ;-) for now. |
| ||||
| Don Morris <dmorris@cup.hp.com> writes: > gelbeiche wrote: > > I wrote a small C++ program, compiled it with aCC. > > The program aborts with the following error: > > /usr/lib/dld.sl: Call to mmap() failed - TEXT /usr/lib/libCsup_v2.2 > > /usr/lib/dld.sl: Permission denied > > Abort(coredump) > > The permissions of libCsup_v2.2 are > > -rw-rw-rw- 1 bea bea 217088 Sep 25 2002 /usr/lib/libCsup_v2.2 > > Is the executable flag required for memory mapping ? > > If yes why ? > > Given that this is a Shared Library, and dld was trying to > map at least part of it as TEXT (from above), I have to assume > that if you tusc this, you'll see that the mapping was done > with PROT_EXECUTE (as you'd expect for a shared library text > segment). And yes, if you map with PROT_EXECUTE the underlying > file must be executable from the point of view of the file > system. I read the mmap man page and found your statement confirmed. I could not change the permissions by my self but had to ask a admin. He changed it to r-xr-xr-x and the program does not longer crash. However I thought the lib is installed by sam as depot file and I wondered *how* a lib can have wrong permissions. I do not think that someone changed the permissions manually to rw-rw-rw. > As to why -- well, why would you want to let people > arbitrarily map in binaries and execute them when they don't > have executable permission on the underlying file in the > first place? > > > Does it mean libCsup_v2.2 was wrong installed ? > > I would imagine so -- it certainly shows as > -r-xr-xr-x on the systems I have access to. > > > Where do I find a description of this library ? > > http://docs.hp.com/en/5185-4304/ch13s06.html > Really good link, thx. |