From owner-freebsd-current Thu Sep 19 0:20:12 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 E902937B401 for ; Thu, 19 Sep 2002 00:20:08 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86F9D43E6E for ; Thu, 19 Sep 2002 00:20:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020919072008.INNB5081.rwcrmhc52.attbi.com@InterJet.elischer.org>; Thu, 19 Sep 2002 07:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id AAA11318; Thu, 19 Sep 2002 00:18:49 -0700 (PDT) Date: Thu, 19 Sep 2002 00:18:48 -0700 (PDT) From: Julian Elischer To: Daniel Eischen 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 Thu, 19 Sep 2002, Daniel Eischen wrote: > 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. so does that code still exist? > The kernel uses these to validate a context and returns an > error if these fields aren't valid. so, we need to change the kernel too right? > > 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). If we remove the calls, is the original code still present? or did that get removed? > > 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