From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31250 invoked by alias); 10 Mar 2004 19:18:50 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 31233 invoked from network); 10 Mar 2004 19:18:50 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 10 Mar 2004 19:18:50 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i2AH9fnd020807; Wed, 10 Mar 2004 18:09:41 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2AH9far020805; Wed, 10 Mar 2004 18:09:41 +0100 Date: Wed, 10 Mar 2004 19:18:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Andreas Schwab , Glibc hackers Subject: [PATCH] IA-64 pt-vfork fix Message-ID: <20040310170941.GA3822@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <404BDA36.6000202@redhat.com> <200403080237.i282bXG6004322@magilla.sf.frob.com> <20040308110105.GN3822@sunsite.ms.mff.cuni.cz> <404D76CA.4010500@redhat.com> <20040309115038.GO3822@sunsite.ms.mff.cuni.cz> <404F61F7.1000006@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404F61F7.1000006@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00057.txt.bz2 On Wed, Mar 10, 2004 at 10:44:07AM -0800, Ulrich Drepper wrote: > I applied the hopefully correct patch. pt-vfork.S still needed similar changes. The following patch works for me with LD_PRELOAD=pt-vfork.so:libpthread.so ./tst-vfork{1,2} 2004-03-10 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use a local register for saving old PID. Negate PID in parent upon exit. --- libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S.jj 2004-03-10 20:02:20.000000000 +0100 +++ libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S 2004-03-10 20:14:25.288330129 +0100 @@ -32,22 +32,26 @@ ENTRY(__vfork) .prologue // work around a GAS bug which triggers if .body // first .prologue is not at the beginning of proc. - alloc r2=ar.pfs,0,1,2,0 + alloc r2=ar.pfs,0,0,2,0 adds r14=PID,r13 ;; - ld4 loc0=[r14] + ld4 r16=[r14] ;; - sub r15=0,loc0 + sub r15=0,r16 mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD mov out1=0 /* Standard sp value. */ ;; st4 [r14]=r15 DO_CALL (SYS_ify (clone)) cmp.eq p0,p7=0,r8 - cmp.eq p6,p0=-1,r10 adds r14=PID,r13 ;; -(p7) st4 [r14]=loc0 +(p7) ld4 r16=[r14] + cmp.eq p6,p0=-1,r10 + ;; +(p7) sub r15=0,r16 + ;; +(p7) st4 [r14]=r15 (p6) br.cond.spnt.few __syscall_error ret PSEUDO_END(__vfork) Jakub