From owner-cvs-all Thu Aug 19 12:16:11 1999 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id DD96E14C1A; Thu, 19 Aug 1999 12:16:03 -0700 (PDT) (envelope-from bright@wintelcom.net) Received: from localhost (bright@localhost) by fw.wintelcom.net (8.8.8/8.8.8) with ESMTP id MAA20106; Thu, 19 Aug 1999 12:29:08 GMT (envelope-from bright@wintelcom.net) Date: Thu, 19 Aug 1999 12:29:07 +0000 (GMT) From: Alfred Perlstein To: Daniel Eischen Cc: alfred@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Fabian Thylmann Subject: Re: cvs commit: src/lib/libc_r/uthread uthread_kern.c In-Reply-To: <199908191747.NAA21199@pcnet1.pcnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Thu, 19 Aug 1999, Daniel Eischen wrote: > > alfred 1999/08/19 09:49:54 PDT > > > > Modified files: > > lib/libc_r/uthread uthread_kern.c > > Log: > > handle under/overflow of time values in a more robust manner, > > there may be an overflow that need to be adjusted more than once. > > I think this is a coverup for the real problem. Timevals and Timespecs > should be validated in pthread_cond_timedwait(), select(), nanosleep(), > etc, and errno set appropriately (EINVAL returned for pthread_cond_timedwait). > Correcting for the subtraction of two _valid_ tv_nsec fields should only > need to be done once. I'm not too sure, the checking of overflow that was there previously was insufficient, i've talked to the person experiancing the bug and they don't use pthread_cond_timedwait, and i doubt that they are using sleep and/or select. there should be a catch for invalid time passed to the cond_timedwait function though. I'm cc'ing the person who is experiancing the bug. Fabian: are you using anything in your code that uses time structures? (select/sleep)? may I commit a check akin to the one in nanosleep to catch negative/ out-of-range time values? thanks, -Alfred Perlstein - [bright@rush.net|alfred@freebsd.org] Wintelcom systems administrator and programmer - http://www.wintelcom.net/ [bright@wintelcom.net] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message