From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/154 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts review Date: Wed, 13 Jul 2011 16:03:27 -0400 Message-ID: <20110713200327.GI16618@brightrain.aerifal.cx> References: <20110713110723.GA22153@openwall.com> <4E1D8964.3020502@gmail.com> <20110713160327.GA24660@openwall.com> <4E1DCDE5.1040008@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1310587978 21040 80.91.229.12 (13 Jul 2011 20:12:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 20:12:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-239-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 13 22:12:54 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qh5nh-0002gJ-S1 for gllmg-musl@lo.gmane.org; Wed, 13 Jul 2011 22:12:54 +0200 Original-Received: (qmail 23727 invoked by uid 550); 13 Jul 2011 20:12:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23716 invoked from network); 13 Jul 2011 20:12:52 -0000 Content-Disposition: inline In-Reply-To: <4E1DCDE5.1040008@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:154 Archived-At: On Wed, Jul 13, 2011 at 06:55:01PM +0200, Luka Marčetić wrote: > that gets executed with each string). The huge long long integer > printout is I guess what makes it look as if there are more messages > than there are. Other than that, it's probably the implementations. musl definitely has a lot of bugs in this area, and may rewrite the code (for floating point I will definitely rewrite it because the current approach is inexact and fundamentally can't be right). But I think at least the huge long double test is wrong: strtold(.... offsets endptr by 4940 instead of by 0 As far as I can tell, the string you pass is of the expected form for the subject sequence. It may overflow to infinity or lose precision, but it's still valid. strtold is only supposed to store the initial pointer in endptr if the subject sequence is empty or does not have the expected form; otherwise it stores a pointer to the byte just past the end of the subject sequence. Does this make sense? Admittedly I need to review the rest of the tests more thoroughly too. Rich