assertion failure in snprntffuns.c:79 for i686-w64-mingw32

Marco Bodrato bodrato at mail.dm.unipi.it
Fri Jan 10 15:27:31 UTC 2020


Ciao,

Il 2020-01-10 14:12 Vincent Lefevre ha scritto:
> On 2020-01-10 08:44:13 +0100, Niels Möller wrote:
>> Vincent Lefevre <vincent at vinc17.net> writes:

>> > FAIL: t-printf
>> > ==============

>> > The failing code is
>> >
>> >       ret = vsnprintf (d->buf, avail, fmt, ap);
>> >       if (ret == -1)
>> >         {
>> >           ASSERT (strlen (d->buf) == avail-1);
>> >           ret = avail-1;
>> >         }

This code was changed.

https://gmplib.org/repo/gmp/rev/d6b57abdad8e

Can you please try with the development version?

>> > I don't understand the ASSERT. A return value of -1 means an output
>> > error, so that you cannnot deduce anything about the contents stored
>> > in d->buf.
>> 
>> Non-standard versions of snprintf returned -1 for truncation 
>> (including
>> old glibc, and likely windows libc too). And the way I read the 
>> ASSERT,

The change above was explained in the following message to the list:

https://gmplib.org/list-archives/gmp-devel/2018-January/004694.html

Ĝis,
m


More information about the gmp-bugs mailing list