Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

From: NGie Cooper <yaneurabeya_at_gmail.com>
Date: Thu, 9 Jul 2015 02:17:48 -0700
On Thu, Jul 9, 2015 at 1:41 AM, Konstantin Belousov <kostikbel_at_gmail.com> wrote:
> On Thu, Jul 09, 2015 at 08:27:17AM +1000, Peter Jeremy wrote:
>> I'm not sure if we want to explicitly document the conditions under which
>> gettimeofday() (or clock_gettime()) are implemented in userland vs syscalls
>> because that is guaranteed to get stale over time.  How about stating that
> Of course, we don't.  There is no guarantee that the set of conditions
> is stable even on the stable branch.
>
>> these functions are implemented as syscalls only if the AT_TIMEKEEP value
>> reported by "procstat -x" is NULL.
> Mere presence of AT_TIMEKEEP does not imply the use of the fast path.
> E.g. the fast path can be disabled dynamically, or timecounter could be
> changed, or libc might be of the wrong version.  My imagination stops
> there.
>
> IMO the point of this discussion is to note that test suite tests useless

useless -> inapplicable

> things.

things. -> things [for FreeBSD].

> If somebody run the test suite for libc, she would immediately note
> another failing test for the stack protector, which is similar to the
> gettimeofday nonsense.

Perhaps, but that's assuming that NetBSD implemented gettimeofday in
userland, which is doesn't.

I agree that this is less applicable for FreeBSD than NetBSD. Please
keep in mind that contrib/netbsd-tests came from NetBSD, not FreeBSD.
Peter Holm and I tried our best to vet out the issues with the test
suite before integrating it in, but there might be issues due to
implementation discrepancies between FreeBSD and NetBSD.

Thanks,
-NGie
Received on Thu Jul 09 2015 - 07:17:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC