Your message dated Wed, 23 Jul 2008 19:47:22 +0200 with message-id <[EMAIL PROTECTED]> and subject line Re: Bug#492071: libc: execl adds a random pointer when calling execve has caused the Debian Bug report #492071, regarding libc: execl adds a random pointer when calling execve to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [EMAIL PROTECTED] immediately.) -- 492071: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492071 Debian Bug Tracking System Contact [EMAIL PROTECTED] with problems
--- Begin Message ---Package: libc Version: glibc Severity: important The following code either (compiled with either gcc 4.2 or 4.3) dies with EFAULT (bad address) or spits out some random garbage after the "hello world!". #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <stdio.h> int main(){ pid_t cpid; cpid = fork(); if (0 == cpid) { // Child execl("/bin/echo","/bin/echo","hello world!"); perror("execution of /bin/echo failed in "__FILE__); } else // Parent waitpid(cpid,0,0); return 0; } Tracing it with strace -f reveals that execl is internally passing a third garbage pointer to execve. .... 6368 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f187a700770) = 6369 6368 wait4(6369, <unfinished ...> 6369 execve("/bin/echo", ["/bin/echo", "hello world!", 0xffffffffffffffff], [/* 42 vars */]) = -1 EFAULT (Bad address) .... -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
--- End Message ---
--- Begin Message ---On Wed, Jul 23, 2008 at 12:32:37PM -0400, Tyson Whitehead wrote: > Package: libc > Version: glibc > Severity: important > > The following code either (compiled with either gcc 4.2 or 4.3) dies with > EFAULT > (bad address) or spits out some random garbage after the "hello world!". > > #include <sys/types.h> > #include <sys/wait.h> > #include <unistd.h> > #include <stdio.h> > > int main(){ > pid_t cpid; > > cpid = fork(); > if (0 == cpid) { // Child > execl("/bin/echo","/bin/echo","hello world!"); > perror("execution of /bin/echo failed in "__FILE__); > } > else // Parent > waitpid(cpid,0,0); > > return 0; > } > Garbage in, garbage out. You MUST terminate with (char*)NULL the variadic arg list. That's mandatory, not optional. See exec(3) man page. -- Francesco P. Lovergine
--- End Message ---

