|
From: <sv...@va...> - 2005-07-19 22:59:49
|
Author: tom
Date: 2005-07-19 23:59:47 +0100 (Tue, 19 Jul 2005)
New Revision: 4201
Log:
Pass clone arguments in the correct order when doing a fork style
clone. This should fix bug #109358.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-07-19 22:48:04 U=
TC (rev 4200)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-07-19 22:59:47 U=
TC (rev 4201)
@@ -499,7 +499,7 @@
VG_(clone) stuff */
res =3D VG_(do_syscall5)( __NR_clone, flags,=20
(UWord)NULL, (UWord)parent_tidptr,=20
- (UWord)NULL, (UWord)child_tidptr );
+ (UWord)child_tidptr, (UWord)NULL );
=20
if (!res.isError && res.val =3D=3D 0) {
/* child */
|
|
From: Julian S. <js...@ac...> - 2005-07-19 23:18:38
|
> Pass clone arguments in the correct order when doing a fork style
> clone. This should fix bug #109358.
Well spotted; but (mystified) the implication is that the amd64
arg order for __NR_clone is different from what it is on x86 ?
Is that right?
Because now the amd64 wrapper says:
res = VG_(do_syscall5)( __NR_clone, flags,
(UWord)NULL, (UWord)parent_tidptr,
(UWord)child_tidptr, (UWord)NULL );
vs x86:
res = VG_(do_syscall5)( __NR_clone, flags,
(UWord)NULL, (UWord)parent_tidptr,
(UWord)NULL, (UWord)child_tidptr );
and that then raises the question of what order it is on ppc32.
J
|
|
From: Tom H. <to...@co...> - 2005-07-20 06:09:03
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> > Pass clone arguments in the correct order when doing a fork style
> > clone. This should fix bug #109358.
>
> Well spotted; but (mystified) the implication is that the amd64
> arg order for __NR_clone is different from what it is on x86 ?
> Is that right?
Yes - I checked the kernel source for both. I nearly changed the x86
one as well but then I check the kernel source and realised it was
actually the comment in that assembly code that was wrong for x86.
I think on x86 they are in the order they were added in but for amd64
they took the opportunity to order them more logically.
> and that then raises the question of what order it is on ppc32.
It looks like ppc32 is the same as x86.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <nj...@cs...> - 2005-07-20 13:42:45
|
On Wed, 20 Jul 2005, Tom Hughes wrote: >> Well spotted; but (mystified) the implication is that the amd64 >> arg order for __NR_clone is different from what it is on x86 ? >> Is that right? > > Yes - I checked the kernel source for both. I nearly changed the x86 > one as well but then I check the kernel source and realised it was > actually the comment in that assembly code that was wrong for x86. > > I think on x86 they are in the order they were added in but for amd64 > they took the opportunity to order them more logically. Did you add a comment in the AMD64 code explaining the different order to x86? N |