From owner-cvs-all Wed Sep 29 4:35:15 1999 Delivered-To: cvs-all@freebsd.org Received: from hda.hda.com (hda-bicnet.bicnet.net [209.244.238.132]) by hub.freebsd.org (Postfix) with ESMTP id E41C915157; Wed, 29 Sep 1999 04:34:30 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id HAA16874; Wed, 29 Sep 1999 07:31:10 -0400 (EDT) From: Peter Dufault Message-Id: <199909291131.HAA16874@hda.hda.com> Subject: Re: cvs commit: src/lib/libc/net res_send.c In-Reply-To: <199909281540.IAA71052@freefall.freebsd.org> from Peter Wemm at "Sep 28, 99 08:40:18 am" To: peter@FreeBSD.org (Peter Wemm) Date: Wed, 29 Sep 1999 07:31:10 -0400 (EDT) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > peter 1999/09/28 08:40:18 PDT > > Modified files: > lib/libc/net res_send.c > Log: > Fix previous commit. The standards specifically say: "The structure > sigaction, used to describe an action to be taken, is defined in the > header to include at least the following members:" > ^^^^^^^^ > A sigaction defined on stack with essentially random contents may have > just about anything underneath fields that the program doesn't know about. > It is not safe to delete the bzero. It goes on to say: "Adding extensions to this structure, which might change the behavior of the application with respect to this standard when those fields in the structue are uninitialized, also requires that the extensions be enabled as required by 1.3.1.1" 1.3.1.1 Paragraph 2: "The system may provide additional functions or facilities not required by this standard. Nonstandard extensions should be identified as such in the system documentation. Nonstandard extensions, when used, may change the behavior of functions or facilities defined by this standard. The conformance document shall define an environment in which an application can be run with the behavior specified by the standard. In no case shall such an environment require modification of a Strictly Conforming POSIX.1 Application". Adding a bzero to protect against unknown, unspecified, and not explicitly enabled extensions should be avoided. IMHO the non-bzeroed case should work on all flavors of FBSD. I know where Bruce is coming from, I realize that we haven't enabled the strict environment, but in my opinion on any sensible system the bzero shouldn't be needed. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message