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

From: Doug Rabson <dfr_at_rabson.org>
Date: Thu, 9 Jul 2015 15:14:09 +0100
On Thursday, July 9, 2015, Garrett Wollman <wollman_at_hergotha.csail.mit.edu>
wrote:

> In article
> <CAPQ4ffvEm2uzi-QpTm_6MsNeELWfT814G1kE4RGXU6mrZWYPeg_at_mail.gmail.com
> <javascript:;>>,
> oliver.pinter_at_hardenedbsd.org <javascript:;> writes:
>
> >Btw, I have found this is atf's documantation:
> >atf_tc_expect_signal(SIGSEGV, "reaseon"), with this, we could mark the
> >specific test case could "fail" / or expect to coredump.
>
> No.
>
> I'm not sure why people are having trouble understanding this.
>
> The test in question is not valid C.  It is entirely erroneous, and
> should be deleted.  Merely computing the value "(void *)-1" is allowed
> to perform LITERALLY ANY ACTION AT ALL, including turning your
> computer into a frog.  The compiler is free to implement this as a
> call to abort() if it chooses.  Testing this is nonsensical.
>
> -GAWollman
> _______________________________________________
> freebsd-current_at_freebsd.org <javascript:;> mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org
> <javascript:;>"
>

+1
Received on Thu Jul 09 2015 - 12:14:17 UTC

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