Date: Fri, 11 Jun 1999 14:00:02 -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: <199906112100.OAA08657@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 13:50:44 -0700
Even that is not enough. Apparently tv_sec can be <0 too:
Cannot set scheduling timer, errno=22, v.s=-1, v.us=1000
Presumable, usec was set to 1,000 by my hack. But the seconds were negative
too! This crash is rarer than the one where just the usec value is negative.
Here's my new hacked fix:
if ( (itimer.it_value.tv_usec<0) ||
(itimer.it_value.tv_sec<0) )
{
itimer.it_value.tv_usec=1000;
itimer.it_value.tv_sec=0;
}
David Schwartz
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?199906112100.OAA08657>
