Subject: __clone(2) fix
To: None <port-sparc@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: port-sparc
Date: 12/25/2006 22:58:21
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The attached patch is the straight port of a change I did to sparc64 to fix
a SIGSEGV due to access just above the allocated stack in the cloned process
when running the regress/lib/libc/clone test.
I'm not sure why sparc does not seem to hit this segfault, but IMHO the
same fix should be needed.
Am I overlooking something?
Martin
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: __clone.S
===================================================================
RCS file: /cvsroot/src/lib/libc/arch/sparc/sys/__clone.S,v
retrieving revision 1.3
diff -u -r1.3 __clone.S
--- __clone.S 23 Jan 2004 13:45:43 -0000 1.3
+++ __clone.S 25 Dec 2006 21:47:43 -0000
@@ -62,7 +62,7 @@
/*
* Store the function and the argument on our child's stack
*/
- sub %o1, 8, %o1 ! make space on the child's stack
+ sub %o1, 8+96, %o1 ! make space on the child's stack
st %i0, [%o1] ! save func
st %i3, [%o1+4] ! save arg
--vkogqOf2sHV7VnPd--