From owner-freebsd-current@freebsd.org Wed Jul 8 21:36:40 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 A05B5997EAC for ; Wed, 8 Jul 2015 21:36:40 +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 440101BF6; Wed, 8 Jul 2015 21:36:39 +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 t68LabAC098000; Wed, 8 Jul 2015 17:36:37 -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 t68LaadU097999; Wed, 8 Jul 2015 17:36:37 -0400 (EDT) (envelope-from wollman) Date: Wed, 8 Jul 2015 17:36:37 -0400 (EDT) From: Garrett Wollman Message-Id: <201507082136.t68LaadU097999@hergotha.csail.mit.edu> To: avg@freebsd.org Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-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> <559D8E55.9050600@FreeBSD.org> 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]); Wed, 08 Jul 2015 17:36:37 -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: Wed, 08 Jul 2015 21:45:48 +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: Wed, 08 Jul 2015 21:36:40 -0000 In article <559D8E55.9050600@FreeBSD.org> avg@freebsd.org writes: >I am not suggesting this but if our man pages used all capitals to signify >important auxiliary verbs then the ERRORS sections would read as > The following error codes MAY be set in errno: >Perhaps in that case it would be more clear how 'MAY' differs from 'SHOULD' and >'MUST'. >Of course, the manual pages seem to be too sloppy in this respect. No, it's just the standard meaning of "may" as defined in the POSIX standard. ISO standards in general use "shall" for mandatory behavior and "may" for optional behavior. (For every occurrence of the word "shall" in the POSIX standard, there should be a conformance test[1]; "may" covers behavior where implementations are allowed to differ with no conformance distinction being made.) In the specific case of library interfaces, "may fail and set the following code in errno" is slightly more restrictive: the implementation is required to raise that error if the associated condition is detected, but it is not required to detect that condition even if it is present, and it may indicate some other error condition that is present and detectable. -GAWollman [1] Technically, this applies only to "shall" where the subject is the implementation. POSIX also includes "shall" requirements on applications, which obviously can't be tested.