From owner-freebsd-bugs Fri Jun 11 13: 0: 9 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 76F0714CB0 for ; Fri, 11 Jun 1999 13:00:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA03532; Fri, 11 Jun 1999 13:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Fri, 11 Jun 1999 13:00:02 -0700 (PDT) Message-Id: <199906112000.NAA03532@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Chris Costello Subject: Re: kern/12141: libc_r passes negative tv_usec values to setitimer -- crash Reply-To: Chris Costello Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/12141; it has been noted by GNATS. From: Chris Costello To: davids@webmaster.com Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/12141: libc_r passes negative tv_usec values to setitimer -- crash Date: Fri, 11 Jun 1999 14:56:57 -0500 On Fri, Jun 11, 1999, davids@webmaster.com wrote: > This is the *wrong* fix, but it does make the problem go away. > > in uthread_kern.c: > /* > * Start the interval timer for the > * calculated time interval: > */ > if(itimer.it_value.tv_usec<=0) > itimer.it_value.tv_usec=1000; > if (setitimer(_ITIMER_SCHED_TIMER, &itimer, NULL > ) != 0) { > > > The 'if' has been added to remove the problem. But the real problem is why it's computing negative values in the first place. Actually, that's even wrong for your wrong fix. The hack you probably want is more along the lines of if (itimer.it_value.tv_usec < 0) itimer.it_value.tv_usec = 1000; It's perfectly ok for tv_usec to be 0. -- Chris Costello As far as we know, our computer has never had an undetected error. - Weisert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message