This is the mail archive of the libc-alpha@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]

[PATCH] sh: Fix clone exit return code


Since 3f823e87cc (Call exit directly in clone (BZ #21512)) SH clone
implementation fails to set the exit code resulting in the failures:

FAIL: nptl/tst-align-clone
FAIL: nptl/tst-getpid1

This patch fixes the both testcases.

	* sysdeps/unix/sysv/linux/sh/clone.S (__clone): Fix exit return
	code.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
---
 ChangeLog                          | 6 ++++++
 sysdeps/unix/sysv/linux/sh/clone.S | 1 +
 2 files changed, 7 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/sh/clone.S b/sysdeps/unix/sysv/linux/sh/clone.S
index b13a64b..d369a82 100644
--- a/sysdeps/unix/sysv/linux/sh/clone.S
+++ b/sysdeps/unix/sysv/linux/sh/clone.S
@@ -73,6 +73,7 @@ ENTRY(__clone)
 	 mov.l	@(4,r15), r4
 
 	/* we are done, passing the return value through r0  */
+	mov     r0, r4
 	mov	#+SYS_ify(exit), r3
 	trapa	#0x15
 	.align	2
-- 
2.7.4


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