[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Make pthread_once return 0 on x86



The assembly code for pthread_once doesn't clear %eax, violating SUSv3.
This patch makes dig and nslookup work.

--- nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S	2002-10-02 08:21:25.000000000 +0200
+++ nptl_ldb/sysdeps/unix/sysv/linux/i386/pthread_once.S	2002-11-07 12:45:46.000000000 +0100
@@ -40,6 +40,7 @@
 	movl	4(%esp), %ecx
 	testl	$2, (%ecx)
 	jz	1f
+	xorl	%eax, %eax
 	ret
 
 1:	pushl	%ebx
@@ -128,6 +129,7 @@
 
 4:	popl	%esi
 	popl	%ebx
+	xorl	%eax, %eax
 	ret
 
 	.size	__pthread_once,.-__pthread_once

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]