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

From: Doug Rabson <dfr_at_rabson.org>
Date: Wed, 8 Jul 2015 20:17:55 +0100
As far as I can tell, POSIX doesn't require either EFAULT or any other
behaviour - the text in http://www.open-std.org/jtc1/sc22/open/n4217.pdf
just says, "No errors are defined". Our man page is wrong and any real
program which relies on gettimeofday not faulting when given bad inputs is
broken.

On 8 July 2015 at 17:16, Jamie Landeg-Jones <jamie_at_dyslexicfish.net> wrote:

> Oliver Pinter <oliver.pinter_at_hardenedbsd.org> wrote:
>
> > On 7/8/15, O'Connor, Daniel <darius_at_dons.net.au> wrote:
> > >
> > > In defence of the test, the man page says it can return EFAULT.
> >
> > That's fine, but why changed the behaviour since 2015. May 27.? I have
> > an older FreeBSD/HardenedBSD install, where this test passing. See
> > some previous email in this thread.
>
> That's why it's called 'undefined' :-)
>
> Pedantically, being 'undefined', it's behaviour hasn't changed at all!
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Wed Jul 08 2015 - 17:18:02 UTC

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