[parisc-linux] Re: [PATCH] fix error condition in glibc's clone() call
Carlos O'Donell
carlos at systemhalted.org
Tue Jan 2 17:29:30 MST 2007
On 12/29/06, Helge Deller <deller at gmx.de> wrote:
> The following patch to glibc fixes an error which is triggered by the Linux Test Projects clone04 test, and was already mentioned and analyzed by Mike and Joel (see links to mail threads below).
> The problem is, that if clone(<function>, <stack>, ...) is called and <function> or <stack> is NULL, then %r19 is restored from a location which wasn't initialized.
> Something like this...
> clone:
> if <function> == NULL goto .Lerror
> if <stack>== NULL goto .Lerror
> save_%r19_on_stack
> .....
> .Lerror: restore_%r19_from_stack ##### <- may read from stack without %r19 having been saved here !
> goto __syscall_error
>
> The patch below moves the "save_%r19_on_stack" part above the checks, so that "restore_%r19_from_stack" always reads the correct value.
>
> Any takers to bring this patch into glibc ?
This is already fixed in upstream. Where are you getting your glibc
sources from?
Cheers,
Carlos.
More information about the parisc-linux
mailing list