t-double.c (memory clobbered before allocated block)
michael.tate at wanadoo.fr
Wed Feb 27 15:11:12 CET 2013
Hello to everybody,
This is in reference to a short report I submitted recently concerning a
bug in t-double.c
Thank you for copying me in on your discussions by the way. I have run
gdb and at the risk of telling you something you already know and
clearly understand much better
than me, here is what I found.
The memory allocation error triggers when free(buf) is called in the
dump function, buf is set
via the mpz-get-str function. By allocating a character buffer inside
the dump function, the dump
function completes correctly and then aborts the test segment as
intended. I do not know
why the test itself fails.
A small patch for t-double.c is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 644 bytes
Desc: not available
More information about the gmp-bugs