From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11840 invoked by alias); 10 Mar 2004 15:01:04 -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 11823 invoked from network); 10 Mar 2004 15:01:03 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 10 Mar 2004 15:01:03 -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 i2ACpmnd031812; Wed, 10 Mar 2004 13:51:48 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2ACpmXp031806; Wed, 10 Mar 2004 13:51:48 +0100 Date: Wed, 10 Mar 2004 15:01:00 -0000 From: Jakub Jelinek To: Andreas Schwab Cc: Ulrich Drepper , Glibc hackers Subject: Re: [PATCH] getpid/vfork/raise fix Message-ID: <20040310125148.GU3822@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> <20040310101515.GS3822@sunsite.ms.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00046.txt.bz2 On Wed, Mar 10, 2004 at 03:33:05PM +0100, Andreas Schwab wrote: > That doesn't seem to work, though. I'm getting p3 != p4 in the posix > vfork tests. Or do you see any error in my implementation? Yes. > ENTRY(__vfork) > alloc r2=ar.pfs,0,0,2,0 > adds r14=PID,r13 > ;; > ld4 r16=[r14] > ;; > sub r15=0,r16 > cmp.eq p0,p6=0,r16 This line should read cmp.eq p6,p0=0,r16 instead. You want to set ->pid to 0x80000000 if ->pid has been previously 0, not non-zero. With this change both tst-vfork1.c and tst-vfork2.c pass for me (well, I was testing with a LD_PRELOAD'ed lib containing just this assembly, did not want to build full ia64 glibc). Jakub