Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3E149EA5.1060704@ece.gatech.edu> Date: Thu, 02 Jan 2003 15:18:45 -0500 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jason Tishler , cygwin AT cygwin DOT com Subject: Re: Heads up: *possible* bug in cygwin References: <3E10A7AE DOT 20405 AT ece DOT gatech DOT edu> <3E10C29B DOT 2010709 AT ece DOT gatech DOT edu> <3E111AAF DOT 3090008 AT ece DOT gatech DOT edu> <20021231043913 DOT GA26944 AT redhat DOT com> <3E11AD26 DOT 8050506 AT ece DOT gatech DOT edu> <20021231175349 DOT GC6542 AT redhat DOT com> <3E123A28 DOT 8030705 AT ece DOT gatech DOT edu> <1041383123 DOT 6526 DOT 13 DOT camel AT lifelesswks> <3E137A39 DOT 9050204 AT ece DOT gatech DOT edu> <3E13C1E1 DOT 1000103 AT ece DOT gatech DOT edu> <20030102192138 DOT GA1668 AT tishler DOT net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jason Tishler wrote: > I concur. In fact, this problem is the root cause for the Cygwin Python > SEGV that I was trying to debug in the following: > > http://cygwin.com/ml/cygwin-developers/2002-12/msg00027.html > > For those interested, Python's test_format regression test would SEGV > after trying to display a 109 digit number. Unfortunately, this > occurred deep in Python's garbage collection during exit which threw me > off the track. Sigh... > > Thanks for your astute analysis. With the attached "patch," I was able > to get test_format to pass. I will monitor the newlib list to see what > the outcome is. But that's just *wrong*. You simply move the error condition to larger strings. NDEC=42 actually makes sense -- that's (relatively close to) the most base-10 digits that a floating point number can represent (not counting those infinitely repeating base-10 numbers thanks to floating point "roundoff" -- e.g. where the closest representation to "0.1" in base-2 float is (after reconverting to base-10) 0.9999999999999.....). Of course, my "solution" for glib (inside pkgconfig-0.14) is even worse: "don't do that". I simply changed the format string to %42.42f instead of %10000.10000f. It's not a glib problem, after all, so for now I just work around it -- and hope that an acceptable solution for the newlib issue is found. [I don't mind coding that solution, but I dunno what the "Right Thing" to do is...I'm waiting for guidance from the newlib list] --Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/