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 Date: Thu, 02 Jan 2003 14:21:38 -0500 From: Jason Tishler Subject: Re: Heads up: *possible* bug in cygwin In-reply-to: <3E13C1E1.1000103@ece.gatech.edu> To: cygwin AT cygwin DOT com Mail-followup-to: cygwin AT cygwin DOT com Message-id: <20030102192138.GA1668@tishler.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_nv4OxJ2kD/BbiF56qnsb0Q)" User-Agent: Mutt/1.4i 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> --Boundary_(ID_nv4OxJ2kD/BbiF56qnsb0Q) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline Chuck, On Wed, Jan 01, 2003 at 11:36:49PM -0500, Charles Wilson wrote: > Turns out, the problem IS in newlib. 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. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 --Boundary_(ID_nv4OxJ2kD/BbiF56qnsb0Q) Content-type: text/plain; charset=us-ascii; NAME=ldtoa.c.diff Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=ldtoa.c.diff Index: newlib/libc/stdlib/ldtoa.c =================================================================== RCS file: /cvs/src/src/newlib/libc/stdlib/ldtoa.c,v retrieving revision 1.6 diff -u -p -r1.6 ldtoa.c --- newlib/libc/stdlib/ldtoa.c 12 Nov 2002 21:47:53 -0000 1.6 +++ newlib/libc/stdlib/ldtoa.c 2 Jan 2003 19:12:30 -0000 @@ -36,7 +36,7 @@ void _IO_ldtostr(long double *, char *, /* Maximum number of decimal digits in ASCII conversion * = NBITS*log10(2) */ - #define NDEC (NBITS*8/27) + #define NDEC 256 // (NBITS*8/27) /* The exponent of 1.0 */ #define EXONE (0x3fff) @@ -2750,8 +2750,8 @@ if( ndigits > NDEC ) ndigits = NDEC; /* reentrancy addition to use mprec storage pool */ -_REENT_MP_RESULT(ptr) = Balloc (ptr, 3); -_REENT_MP_RESULT_K(ptr) = 3; +_REENT_MP_RESULT(ptr) = Balloc (ptr, 5); +_REENT_MP_RESULT_K(ptr) = 5; outstr = (char *)_REENT_MP_RESULT(ptr); etoasc( e, outstr, ndigits, mode, ldp ); --Boundary_(ID_nv4OxJ2kD/BbiF56qnsb0Q) Content-Type: text/plain; charset=us-ascii -- 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/ --Boundary_(ID_nv4OxJ2kD/BbiF56qnsb0Q)--