From owner-freebsd-current@freebsd.org Thu Jul 9 14:04:51 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B54099684D for ; Thu, 9 Jul 2015 14:04:51 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A31FA146E for ; Thu, 9 Jul 2015 14:04:50 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.9/8.14.9) with ESMTP id t69E4lYQ007745; Thu, 9 Jul 2015 10:04:47 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.9/8.14.4/Submit) id t69E4lXJ007744; Thu, 9 Jul 2015 10:04:47 -0400 (EDT) (envelope-from wollman) Date: Thu, 9 Jul 2015 10:04:47 -0400 (EDT) From: Garrett Wollman Message-Id: <201507091404.t69E4lXJ007744@hergotha.csail.mit.edu> To: oliver.pinter@hardenedbsd.org Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT X-Newsgroups: mit.lcs.mail.freebsd-current References: <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> <201507081616.t68GGcY9047713@dyslexicfish.net> <0C541CE5-C322-4273-AE0B-1ACAEACCA096@gmail.com> <20150708222717.GE98562@server.rulingia.com> <20150709084145.GI2080@kib.kiev.ua> Organization: none Cc: freebsd-current@freebsd.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (hergotha.csail.mit.edu [127.0.0.1]); Thu, 09 Jul 2015 10:04:47 -0400 (EDT) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hergotha.csail.mit.edu X-Mailman-Approved-At: Thu, 09 Jul 2015 14:12:27 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 14:04:51 -0000 In article , 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