From 7f11212ef182ff0b0e730a970fda2640b1249c3f Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 10 May 1996 16:43:47 +0000 Subject: [PATCH] Fix a bogon in the pic + threadsafe version of cerror, it was missing a PIC_EPILOGUE (leaving an extra long on the stack). Submitted by: John Polstra --- lib/libc/amd64/sys/cerror.S | 8 +++++--- lib/libc/i386/sys/cerror.S | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S index 926dcd9fff0..632939b9d82 100644 --- a/lib/libc/amd64/sys/cerror.S +++ b/lib/libc/amd64/sys/cerror.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $ + * $Id: cerror.S,v 1.5 1996/05/05 07:56:11 peter Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $" + .asciz "$Id: cerror.S,v 1.5 1996/05/05 07:56:11 peter Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -56,10 +56,12 @@ HIDENAME(cerror): #ifdef PIC /* The caller must execute the PIC prologue before jumping to cerror. */ call PIC_PLT(CNAME(__error)) + popl %ecx + PIC_EPILOGUE #else call CNAME(__error) -#endif popl %ecx +#endif movl %ecx,(%eax) movl $-1,%eax movl $-1,%edx diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S index 926dcd9fff0..632939b9d82 100644 --- a/lib/libc/i386/sys/cerror.S +++ b/lib/libc/i386/sys/cerror.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $ + * $Id: cerror.S,v 1.5 1996/05/05 07:56:11 peter Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $" + .asciz "$Id: cerror.S,v 1.5 1996/05/05 07:56:11 peter Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -56,10 +56,12 @@ HIDENAME(cerror): #ifdef PIC /* The caller must execute the PIC prologue before jumping to cerror. */ call PIC_PLT(CNAME(__error)) + popl %ecx + PIC_EPILOGUE #else call CNAME(__error) -#endif popl %ecx +#endif movl %ecx,(%eax) movl $-1,%eax movl $-1,%edx