Date: Wed, 8 Jul 2015 20:17:55 +0100 From: Doug Rabson <dfr@rabson.org> To: Jamie Landeg-Jones <jamie@dyslexicfish.net> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT Message-ID: <CACA0VUhFjBhPMTr=QD71jEvis9CMSrnpyu=xFiXu27nLeozGJA@mail.gmail.com> In-Reply-To: <201507081616.t68GGcY9047713@dyslexicfish.net> References: <CAPQ4ffuTcN_ytcH7GPY0s6OqWK9qo6MGaVZhOB%2B0ojWfd=fNCg@mail.gmail.com> <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> <CAPQ4ffuuaiWGUthEhux2VrK6ZyHDT=0xd9z8k8f11N=6shdUng@mail.gmail.com> <201507081616.t68GGcY9047713@dyslexicfish.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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@dyslexicfish.net> wrote: > Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote: > > > On 7/8/15, O'Connor, Daniel <darius@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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACA0VUhFjBhPMTr=QD71jEvis9CMSrnpyu=xFiXu27nLeozGJA>