Date: Thu, 9 Jul 2015 10:04:47 -0400 (EDT) From: Garrett Wollman <wollman@hergotha.csail.mit.edu> To: oliver.pinter@hardenedbsd.org Cc: freebsd-current@freebsd.org Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT Message-ID: <201507091404.t69E4lXJ007744@hergotha.csail.mit.edu> 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> <CACA0VUhFjBhPMTr=QD71jEvis9CMSrnpyu=xFiXu27nLeozGJA@mail.gmail.com> <0C541CE5-C322-4273-AE0B-1ACAEACCA096@gmail.com> <20150708222717.GE98562@server.rulingia.com> <20150709084145.GI2080@kib.kiev.ua> <CAGHfRMBMhraJfMZFnw4A5_NgNdXWsCKmDfw%2B1MiAbqs0VY%2B32Q@mail.gmail.com> <CAPQ4ffvEm2uzi-QpTm_6MsNeELWfT814G1kE4RGXU6mrZWYPeg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <CAPQ4ffvEm2uzi-QpTm_6MsNeELWfT814G1kE4RGXU6mrZWYPeg@mail.gmail.com>, oliver.pinter@hardenedbsd.org 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507091404.t69E4lXJ007744>