delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/08/01/04:59:53

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CAEA3858C2B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1690880390;
bh=fIQjKfbKsFCkgj5dij2ZgxpjrACKYxfyobiNrfe59rw=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=si8qFgJ/mDh/ewgsLG4lh1RWO7lyNpnWsxSHCypcjg7M3sezOUVUhCqp6ezTyt7yQ
2hOHMZCDD/UCwZU26o/O9kQ/ILCmg2eZp1TD6xtKthgXmzvVsR2C8mKW15UQqXbNYk
Z+q9xo7OpEOMnvYIkS4nQ3RSvF/DPn2zYMJRi6Bc=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DC5A3858D28
Date: Tue, 1 Aug 2023 17:59:15 +0900
To: cygwin AT cygwin DOT com
Subject: Re: Probable bug
Message-Id: <20230801175915.4539fb7c1fb93651c0f797f9@nifty.ne.jp>
In-Reply-To: <20230731184106.90479ed81692c3c3a9fd41a9@nifty.ne.jp>
References: <199362107 DOT 5561484 DOT 1690709920649 AT mail1 DOT libero DOT it>
<bf5f14f8-8dfd-13da-87b5-a0117fd04b05 AT cs DOT umass DOT edu>
<20230730203735 DOT 7d94749b4f08a9de9cc3ca9f AT nifty DOT ne DOT jp>
<20230731184106 DOT 90479ed81692c3c3a9fd41a9 AT nifty DOT ne DOT jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mon, 31 Jul 2023 18:41:06 +0900
Takashi Yano wrote:
> On Sun, 30 Jul 2023 20:37:35 +0900
> Takashi Yano wrote:
> > On Sun, 30 Jul 2023 07:29:10 -0400
> > Eliot Moss wrote:
> > > On 7/30/2023 5:38 AM, natan_b--- via Cygwin wrote:
> > > > Hi Guys
> > > > 
> > > > very short.
> > > > 
> > > > prog.c
> > > > 
> > > > #include <stdio.h>
> > > >   
> > > > int main()
> > > > {
> > > > float a=1.283;
> > > > while(1)
> > > > printf( "%f", a );
> > > > }
> > > >   
> > > > run with
> > > > $ ./prog.exe >/dev/null
> > > >   
> > > > in windows monitor process the process increase it's memory it arrive to many  Gb.
> > > > It's not a machine problem, other PC have same problem.
> > > >   
> > > > Same program in wsl and MSYS2 works well!
> > > 
> > > This probably has to do with output buffering, and may happen even without
> > > the >/dev/null since there are no line ends in the output.  It may work with
> > > stdbuf -o0 (as in: stdbuf -o0 ./prog.exe >/dev/null) but may cause the program
> > > to run more slowly (each character is sent to the device, when then immediately
> > > discards it).  It would seem you're hoping for the internal libraries to
> > > recognize the case of writing to /dev/null ...
> > 
> > I also suspected that, however, it was not correct.
> > 
> > while (1) sprintf(buf, "%f\n", a);
> > 
> > has the same problem. :-(
> 
> I looked into this problem, and found the cause.
> This is the serious bug in the commit:
> 
> commit a4705d387f7874f9a5de3ee67861773a17691643
> Author: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
> Date:   Wed Dec 1 06:11:32 2021 +0900
> 
>     ldtoa: Import gdtoa from OpenBSD.
> 
>     - This patch uses gdtoa imported from OpenBSD if newlib configure
>       option "--enable-newlib-use-gdtoa=no" is NOT specified.  gdtoa
>       provides more accurate output and faster conversion than legacy
>       ldtoa, while it requires more heap memory.
> 
> Please let me consider how to fix that.

I have just posted a patch for this issue to newlib mailing list.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019