From owner-freebsd-current Thu Sep 19 0: 0:29 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDEDE37B401 for ; Thu, 19 Sep 2002 00:00:25 -0700 (PDT) Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D97243E4A for ; Thu, 19 Sep 2002 00:00:25 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id g8J70D2j005622; Thu, 19 Sep 2002 03:00:13 -0400 (EDT) Date: Thu, 19 Sep 2002 03:00:13 -0400 (EDT) From: Daniel Eischen To: Julian Elischer Cc: Edwin Culp , current@FreeBSD.ORG Subject: Re: slapd dumping core with today's current. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 18 Sep 2002, Julian Elischer wrote: > threads is broken right now.. > due to a miscommunicatin,. the kernel and the threads library have > a disagreement regarding something.. > Unfortunatly the person to slap up over this is offline for aday or > so.. > please be patient for a day or so (we hope). I think it's because libc_r has been disconnected from the build: revision 1.143 date: 2002/09/17 07:32:36; author: peter; state: Exp; lines: +1 -1 Add i386 to the list of architectures that libc_r is broken on. This effectively removes pppctl from the build for now. It only compiles on alpha now (now ironic). And the i386 mcontext_t is now bigger because we account for the newer SSE (?) format FP register sets. Older libc_r's used ucontext_t's that were smaller and manually save and restore FP state into areas of ucontext_t which mc_len and mc_fpformat now occupy. The kernel uses these to validate a context and returns an error if these fields aren't valid. The fix is to remove the two calls to FP_SAVE_UC and FP_RESTORE_UC in libc_r/uthread/uthread_kern.c. And to also hook libc_r back into the build (src/lib/Makefile). Libc_r patch included (which my mailer will probably mangle). -- Dan Eischen Index: pthread_private.h =================================================================== RCS file: /opt/d/CVS/src/lib/libc_r/uthread/pthread_private.h,v retrieving revision 1.73 diff -u -r1.73 pthread_private.h --- pthread_private.h 29 Aug 2002 23:06:06 -0000 1.73 +++ pthread_private.h 19 Sep 2002 06:53:57 -0000 @@ -75,16 +75,6 @@ #define SET_STACK_JB(jb, stk) (jb)[0]._jb[2] = (int)(stk) #define SET_STACK_SJB(sjb, stk) (sjb)[0]._sjb[2] = (int)(stk) #define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_esp = (int)(stk) -#define FP_SAVE_UC(ucp) do { \ - char *fdata; \ - fdata = (char *) (ucp)->uc_mcontext.mc_fpregs; \ - __asm__("fnsave %0": :"m"(*fdata)); \ -} while (0) -#define FP_RESTORE_UC(ucp) do { \ - char *fdata; \ - fdata = (char *) (ucp)->uc_mcontext.mc_fpregs; \ - __asm__("frstor %0": :"m"(*fdata)); \ -} while (0) #define SET_RETURN_ADDR_JB(jb, ra) (jb)[0]._jb[0] = (int)(ra) #elif defined(__alpha__) #include @@ -94,8 +84,6 @@ #define SET_STACK_JB(jb, stk) (jb)[0]._jb[R_SP + 4] = (long)(stk) #define SET_STACK_SJB(sjb, stk) (sjb)[0]._sjb[R_SP + 4] = (long)(stk) #define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_regs[R_SP] = (unsigned long)(stk) -#define FP_SAVE_UC(ucp) -#define FP_RESTORE_UC(ucp) #define SET_RETURN_ADDR_JB(jb, ra) do { \ (jb)[0]._jb[2] = (long)(ra); \ (jb)[0]._jb[R_RA + 4] = (long)(ra); \ Index: uthread_kern.c =================================================================== RCS file: /opt/d/CVS/src/lib/libc_r/uthread/uthread_kern.c,v retrieving revision 1.42 diff -u -r1.42 uthread_kern.c --- uthread_kern.c 29 Aug 2002 00:44:11 -0000 1.42 +++ uthread_kern.c 19 Sep 2002 06:53:55 -0000 @@ -113,8 +113,6 @@ /* Check if this function was called from the signal handler: */ if (ucp != NULL) { - /* XXX - Save FP registers? */ - FP_SAVE_UC(ucp); called_from_handler = 1; DBG_MSG("Entering scheduler due to signal\n"); } @@ -156,9 +154,6 @@ if (ucp == NULL) return; else { - /* XXX - Restore FP registers? */ - FP_RESTORE_UC(ucp); - /* * Set the process signal mask in the context; it * could have changed by the handler. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message