X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C3B9D329EB5 for ; Sun, 17 Oct 2004 22:45:09 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41318-05 for ; Sun, 17 Oct 2004 21:45:05 +0000 (GMT) Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by svr1.postgresql.org (Postfix) with ESMTP id 56794329C63 for ; Sun, 17 Oct 2004 22:45:05 +0100 (BST) Received: from dunslane.net (cpe-024-211-141-025.nc.rr.com [24.211.141.25]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id i9HLqHx21166; Sun, 17 Oct 2004 16:52:17 -0500 Message-ID: <4172E7D8.1000403@dunslane.net> Date: Sun, 17 Oct 2004 17:44:56 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: PostgreSQL-development Subject: Re: strange result from contrib/seg regression on windows References: <4172C96E.6060008@dunslane.net> <10333.1098042565@sss.pgh.pa.us> In-Reply-To: <10333.1098042565@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/556 X-Sequence-Number: 60059 Tom Lane wrote: >Andrew Dunstan writes: > > >>Does anyone have a clue why? >> >> > >Evidently your sscanf isn't setting errno for overflow --- look at >seg_atof() in segparse.y. > > >This code shows several other signs of severe brain death, actually, >like leaking 256 bytes on each call for an error message buffer that it >doesn't even need :-( I'd recommend ripping the whole thing out and >replacing with a call to float4in. > > > > Yeah. If anyone can do this quickly I'd be grateful. Otherwise it will probably be a few days before I get it done. Alternatively, could we not just use strtof instead of sscanf? cheers andrew