From owner-cvs-all Sun Sep 13 08:47:13 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA13009 for cvs-all-outgoing; Sun, 13 Sep 1998 08:47:13 -0700 (PDT) (envelope-from owner-cvs-all) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA13004 for ; Sun, 13 Sep 1998 08:47:12 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id LAA06774 for committers@freebsd.org; Sun, 13 Sep 1998 11:46:57 -0400 (EDT) (envelope-from luoqi) Date: Sun, 13 Sep 1998 11:46:57 -0400 (EDT) From: Luoqi Chen Message-Id: <199809131546.LAA06774@lor.watermarkgroup.com> To: committers@freebsd.org Subject: src/lib/libc/i386/sys/Ovfork.S Sender: owner-cvs-all@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I was looking at Ovfork.S today and I saw some problem with the code. Another instance of the common cut 'n paste mistakes, I suppose. -lq ENTRY(vfork) popl %ecx /* my rta into ecx */ ^^^^^^^^^^^^ <== store return address in %ecx lea SYS_vfork,%eax KERNCALL jb verror vforkok: cmpl $0,%edx /* child process? */ jne child /* yes */ jmp parent .globl CNAME(__error) .type CNAME(__error),@function verror: pushl %eax #ifdef PIC call PIC_PLT(CNAME(__error)) #else call CNAME(__error) #endif popl %ecx ^^^^^^^^^^^^ <== errno, overwrite return address movl %ecx,(%eax) movl $-1,%eax movl $-1,%edx jmp %ecx ^^^^^^^^^^^^ <== jump to errno? child: movl $0,%eax parent: jmp %ecx