public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Andreas Schwab <schwab@suse.de>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] IA-64 pt-vfork fix
Date: Wed, 10 Mar 2004 19:18:00 -0000	[thread overview]
Message-ID: <20040310170941.GA3822@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <404F61F7.1000006@redhat.com>

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  <jakub@redhat.com>

	* 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

  reply	other threads:[~2004-03-10 19:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-07 23:18 getpid/vfork broken Andreas Schwab
2004-03-07 23:30 ` Ulrich Drepper
2004-03-08  2:22   ` Roland McGrath
2004-03-08  2:28     ` Ulrich Drepper
2004-03-08  2:37       ` Roland McGrath
2004-03-08 13:10         ` Jakub Jelinek
2004-03-09  1:28           ` Roland McGrath
2004-03-09  2:04             ` Ulrich Drepper
2004-03-09  3:50               ` Richard Henderson
2004-03-09  7:48           ` Ulrich Drepper
2004-03-09 13:01             ` Andreas Schwab
2004-03-09 13:59               ` [PATCH] getpid/vfork/raise fix Jakub Jelinek
2004-03-09 16:44                 ` Andreas Schwab
2004-03-09 19:38                   ` Jakub Jelinek
2004-03-10  5:53                 ` Ulrich Drepper
2004-03-10 10:37                 ` Andreas Schwab
2004-03-10 12:24                   ` Jakub Jelinek
2004-03-10 14:33                     ` Andreas Schwab
2004-03-10 15:01                       ` Jakub Jelinek
2004-03-10 15:06                         ` Andreas Schwab
2004-03-10 16:56                       ` David Mosberger
2004-03-10 17:02                         ` Jakub Jelinek
2004-03-10 17:45                           ` David Mosberger
2004-03-10 18:19                             ` Jakub Jelinek
2004-03-10 19:24                               ` David Mosberger
2004-03-10 18:44                   ` Ulrich Drepper
2004-03-10 19:18                     ` Jakub Jelinek [this message]
2004-03-10 23:10                       ` [PATCH] IA-64 pt-vfork fix Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040310170941.GA3822@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).