assertion failure in snprntffuns.c:79 for i686-w64-mingw32
vincent at vinc17.net
Fri Jan 10 16:04:56 UTC 2020
On 2020-01-10 16:27:31 +0100, Marco Bodrato wrote:
> This code was changed.
> Can you please try with the development version?
I get the following error:
gmp_vsnprintf return value wrong
want full |127|
FAIL t-printf.exe (exit status: 3)
Note: The issue can be detected with the absence of \0 just before
the sentinel (but a \0 should be written there before the call to
But I now think that this is a bug that should be fixed in MinGW
since the intended behavior now seems to conform to the C standard.
FYI, the __USE_MINGW_ANSI_STDIO macro is now internal and should
no longer be used:
Is there a way to tell GMP's configure that vsnprintf is missing,
so that HAVE_VSNPRINTF is not defined?
BTW, I still notice in printf/vasprintf.c:
ret = vsnprintf (d->buf + d->size, space, fmt, ap);
if (ret == -1)
ASSERT (strlen (d->buf + d->size) == space-1);
ret = space-1;
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-bugs