Bring in FreeBSD 1.2.2.2. Properly unwind the stack when certain
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 5 Apr 2004 05:31:58 +0000 (05:31 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 5 Apr 2004 05:31:58 +0000 (05:31 +0000)
failure cases occur in rfork_thread().

Submitted-by: Igor Sysoev <is@rambler-co.ru>
lib/libc/i386/gen/rfork_thread.S

index 175d85d..f694ee0 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/lib/libc/i386/gen/rfork_thread.S,v 1.2.2.1 2001/02/07 00:12:45 peter Exp $
- * $DragonFly: src/lib/libc/i386/gen/rfork_thread.S,v 1.2 2003/06/17 04:26:43 dillon Exp $
+ * $DragonFly: src/lib/libc/i386/gen/rfork_thread.S,v 1.3 2004/04/05 05:31:58 dillon Exp $
  */
 
 /*
@@ -109,5 +109,9 @@ ENTRY(rfork_thread)
         * Branch here if the thread creation fails:
         */
 2:
+       addl    $8,%esp
+       popl    %esi
+       movl    %ebp,%esp
+       popl    %ebp
        PIC_PROLOGUE
        jmp     PIC_PLT(HIDENAME(cerror))