From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5453 invoked by alias); 26 Feb 2010 22:45:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27758 Received: (qmail 26415 invoked from network); 26 Feb 2010 22:45:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.org does not designate permitted sender hosts) Date: Fri, 26 Feb 2010 23:45:25 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: segfault in strftime Message-ID: <20100226224525.GG13766@prunille.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20100226125256.GC13766@prunille.vinc17.org> <20100226150748.GE13766@prunille.vinc17.org> <20100226151712.05fbe555@news01> <20100226162130.GF13766@prunille.vinc17.org> <201002261645.o1QGji9R022432@news01.csr.com> <100226094731.ZM3981@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <100226094731.ZM3981@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6045-vl-r30587 (2010-02-23) On 2010-02-26 09:47:31 -0800, Bart Schaefer wrote: > That's *probably* safe in this case ... but in general I don't think > so. The standards make no guarantee about the value of errno in the > case where the library call returns "successfully" (however that may > be defined) -- that is, the implementation is allowed to set errno > to what the next upcoming error *might* be, and is not required to > then clear errno before returning success. It is safe for functions that use errno: "The value of errno may be set to nonzero by a library function call whether or not there is an error, provided the use of errno is not documented in the description of the function in this International Standard." -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)