svn commit: r259609 - head/sys/kern

2013-12-19 Thread Stefan Esser
Author: se Date: Thu Dec 19 09:01:46 2013 New Revision: 259609 URL: http://svnweb.freebsd.org/changeset/base/259609 Log: Fix overflow for timeout values of more than 68 years, which is the maximum covered by sbintime (LONG_MAX seconds). Some programs use timeout values in excess of 1000 y

Re: svn commit: r259609 - head/sys/kern

2013-12-19 Thread Bruce Evans
On Thu, 19 Dec 2013, Stefan Esser wrote: Log: Fix overflow for timeout values of more than 68 years, which is the maximum covered by sbintime (LONG_MAX seconds). Not LONG_MAX seconds, but INT32_MAX seconds. LONG_MAX seconds is about 2**32 times larger on 64-bit arches. sbintimes and their

Re: svn commit: r259609 - head/sys/kern

2013-12-19 Thread Stefan Esser
Am 19.12.2013 11:49, schrieb Bruce Evans: > On Thu, 19 Dec 2013, Stefan Esser wrote: > >> Log: >> Fix overflow for timeout values of more than 68 years, which is the >> maximum >> covered by sbintime (LONG_MAX seconds). > > Not LONG_MAX seconds, but INT32_MAX seconds. LONG_MAX seconds is about

Re: svn commit: r259609 - head/sys/kern

2013-12-19 Thread Andreas Tobler
On 19.12.13 18:00, Stefan Esser wrote: > I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the > missing empty line: > > static __inline sbintime_t > timer2sbintime(intptr_t data) > { > > if (data > INT64_MAX / SBT_1MS) > return INT64_MAX; > retur

Re: svn commit: r259609 - head/sys/kern

2013-12-19 Thread Stefan Esser
Am 19.12.2013 21:46, schrieb Andreas Tobler: > On 19.12.13 18:00, Stefan Esser wrote: > >> I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the >> missing empty line: >> >> static __inline sbintime_t >> timer2sbintime(intptr_t data) >> { >> >> if (data > INT64_MAX / SBT_1

Re: svn commit: r259609 - head/sys/kern

2013-12-19 Thread Adrian Chadd
On 19 December 2013 13:15, Stefan Esser wrote: > NB: I should have known better and should have asked for a review of > this change before it wa committed. Sorry for the inconvenience > caused :( Hey, don't be (too) sorry - you chased down and debugged a substantially annoying bug that's