Memory error in function mpf_inp_str and mpf_set_str

Libor Bukata lbukata at gmail.com
Wed Aug 13 13:48:30 CEST 2008


Dear developers,
I wrote simple program, that demonstrate problem. This error is happen only
if  high precision number
is loaded to low precision number. For example if sqrt(2) is write to file
with precision 1000000 digits, than loaded
to mpf_t number with precision 10 digits, expected result is 1.414213562.
System info and valgrind output are in attachments.

I use Gentoo distributed package - gmp-4.2.2-r2:
gmp-4.1.4-noexecstack.patch
gmp-4.2.2-ABI-multilib.patch
gmp-4.2.1-s390.diff
gmp-4.2.2-cstdio-stdfile.patch

Output config.guess: x86_64-unknown-linux-gnu

Thanks you for great library!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gmplib.org/list-archives/gmp-bugs/attachments/20080813/68a8d130/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: system-info.txt
Url: http://gmplib.org/list-archives/gmp-bugs/attachments/20080813/68a8d130/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: valgrind-output.txt
Url: http://gmplib.org/list-archives/gmp-bugs/attachments/20080813/68a8d130/attachment-0001.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-report.c
Type: text/x-csrc
Size: 515 bytes
Desc: not available
Url : http://gmplib.org/list-archives/gmp-bugs/attachments/20080813/68a8d130/attachment.bin 


More information about the gmp-bugs mailing list