delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/17/07:29:30

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7F8D3858434
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1637152168;
bh=FBxDB6M4v51mnsUvK0bNIEKunBBbWfE255EvOE2yEi4=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=B3f6DgerzsRMYou9ownkEBEiijFriU5NYmyDpEaJlXg64GFz7w8fquBb6+rRMe7VY
DpE7sNNhcVEH18+B6AYYk/jXv+lWfPvCUxiM2y/0nwuk0g8WWQ98DrH8iirROhzB8I
qMdVRolJFDqO0ig3nCGgSrsU96oQz5xAy5kJIjls=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7CE63858C27
Date: Wed, 17 Nov 2021 13:27:55 +0100
To: cygwin AT cygwin DOT com
Subject: Re: possible snprintf() regression in 3.3.2
Message-ID: <YZT1S8wDnaBuYf5u@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20211117003718 DOT GF10332 AT venus DOT tony DOT develop-help DOT com>
<20211117182108 DOT b38599f5e13071bf269a0d48 AT nifty DOT ne DOT jp>
MIME-Version: 1.0
In-Reply-To: <20211117182108.b38599f5e13071bf269a0d48@nifty.ne.jp>
X-Provags-ID: V03:K1:f1Fh6+quE5CGAOQadB6GtBsPWWfBf6eHo812hazn9iFt1GNBuYa
+vW8YsZ9rvKKX8RXxMjrJ+aHgroclkw9FhVeZAhsOOPfrS/ype+7nOlD/IL1fCPjrlOlzhD
bdiWza22XsXIq/clHHtQovuXXdzsvky3tCHvhnzvHfAhvA5B556vNgQieAh0okJudGcZPL9
mHrE7pBQFB4Zio1IIb9Nw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:2q+Qqa2hx7M=:16Vn1DKa74+nGMQiNbKYd1
GfN7ilC/BDDyGtSbmTbV0SMNMwgWeuG9EsYKboU8kVyErgsqGo1l4TJjmzVMiHyjoWFJO404C
WdbVP/BRr4bTtolxJ03DRN+jttyYDA2nUeFFXlu17cQVvl/fMskP5LAtTqo8kZ+HVWG5iWtVa
2RW2rP8C7jK7pB19wp4xcjO1ghnW4Fz/UW1RGOdsSnLF6ezaUawP9/LYIPzpCDj+3IAbxBbgo
7rE3BeCbMmFwRhakKnCVI59sebqn5PNmRM4bmipQPf7VDVNW3zS2lxdH041EXpbC8dzFRzgYS
QBq8A8rIIEyObZX3kc+ZS2Af05aAGVfzm7ZgEIxNQCZJfqV2498KDDc8F8IKwDKAN0rCCmcSj
1SknTkYVojzjbu078NVL+6qQ3gmhFn1kr8SNGPZDN1/sV7r9C4NbaTEotUgsILFKBGwhbz3Vl
2w3Tatzlgfhu5Kr0ldg1YchQ/yoKWsJbnbG3olVHbay6pTn8CigBdpz9deerUDZHTZtjgElLf
e8Zi/BnA0rN7DkxmYMwiQJcrrC7sFeQAESzcjd6xluWm1PuxwUuMKBnMf8d/B5cBMRGyc+DHq
LUmVT64580KIQs8i1s0XIhBIPdGChlFEf6UROYgURyniFUnhXzO/NQ9ChXIndqcX2cBJ5gYSo
jNnKodwyiHzoHIHrJ5ifUChxhRxuOt3hUwYeMadGV7mukqiNuIe1SD6av+yBHD+PaU4wqY9Bq
J+0ED1ayWUuygU+U
X-Spam-Status: No, score=-99.1 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_NUMSUBJECT,
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
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 Nov 17 18:21, Takashi Yano via Cygwin wrote:
> On Wed, 17 Nov 2021 11:37:18 +1100
> Tony Cook wrote:
> > This came up from regression testing perl.
> > 
> > Regression testing of perl @4a1b9dd524007193213d3919d6a331109608b90c
> > used (from uname):
> > [...]
> I found the caused by the commit:
> commit 4d90e5335914551862831de3e02f6c102b78435b
> Author: Corinna Vinschen <corinna AT vinschen DOT de>
> Date:   Thu Nov 4 11:30:44 2021 +0100
> 
>     ldtoa: fix dropping too many digits from output
> 
>     ldtoa cuts the number of digits it returns based on a computation of
>     number of supported bits (144) divide by log10(2).  Not only is the
>     integer approximation of log10(2) ~= 8/27 missing a digit here, it
>     also fails to take really small double and long double values into
>     account.
> 
>     Allow for the full potential precision of long double values.  At the
>     same time, change the local string array allocation to request only as
>     much bytes as necessary to support the caller-requested number of
>     digits, to keep the stack size low on small targets.
> 
>     In the long run a better fix would be to switch to gdtoa, as the BSD
>     variants, as well as Mingw64 do.
> 
>     Signed-off-by: Corinna Vinschen <corinna AT vinschen DOT de>
> 
> Reverting this commit solves the problem.
> 
> Corinna, could you please have a look?

I don't have a good solution.  The old ldtoa code is lacking, for
switching newlib to gdtoa I simply don't have the time.  On the newlib
list was a short discussion starting at
https://sourceware.org/pipermail/newlib/2021/018626.html but nothing
came out of it yet.

Patches gratefully accepted (except just reverting the above change).


Corinna

-- 
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