This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12241] New: execve() doesn't return with errono=ENOENT for executable w/o required shared libs.


http://sourceware.org/bugzilla/show_bug.cgi?id=12241

           Summary: execve() doesn't return with errono=ENOENT for
                    executable w/o required shared libs.
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: pluto@agmk.net
              Host: x86_64-gnu-linux
            Target: x86_64-gnu-linux
             Build: x86_64-gnu-linux


Created attachment 5130
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5130
testcase

hi,

on execve() man page:
http://www.kernel.org/doc/man-pages/online/pages/man2/execve.2.html
we can read:

(...)
RETURN VALUE
 On success, execve() does not return, on error -1 is returned,
 and errno is set appropriately.
(...)
 ENOENT
 The file filename or a script or ELF interpreter does not exist,
 or a shared library needed for file or interpreter cannot be found.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                ^^^^^^^^^^^^^^^^

but in the real world the execve() doesn't return if i accidentaly
try to run a child process w/o required shared libs on search path.

$ make
gcc -Wall -g2 parent.c -o parent
gcc -Wall -g2 hello.c -shared -fpic -o libhello.so
gcc -Wall -g2 child.c -o child ./libhello.so
rm libhello.so
./parent
<program name unknown>: error while loading shared libraries:
 ./libhello.so: cannot open shared object file: No such file or directory

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]