Date: Fri, 11 Jun 1999 21:10:01 -0700 (PDT) From: "David Schwartz" <davids@webmaster.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/12141: libc_r passes negative tv_usec values to setitimer -- crash Message-ID: <199906120410.VAA40098@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/12141; it has been noted by GNATS. From: "David Schwartz" <davids@webmaster.com> To: <freebsd-gnats-submit@freebsd.org>, "David Schwartz" <davids@webmaster.com> Cc: Subject: Re: kern/12141: libc_r passes negative tv_usec values to setitimer -- crash Date: Fri, 11 Jun 1999 21:04:53 -0700 Wow, it was an overflow in my code causing me to call pthread_cond_timewait with an out-of-range number of nanoseconds. One billion is awfully close to the maximum an unsigned int/long can hold, so overflows are easy. So the problem really is that pthread_cond_timedwait doesn't return an EINVAL when the input timespec is out of range. Instead it lets the scheduler fault later. The fix is either to document this unusual behavior or put sanity checks in pthread_cond_timedwait. DS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906120410.VAA40098>