[CLN-list] Bug in double_approx() for cl_RA on x86_64
Richard B. Kreckel
kreckel at ginac.de
Sun Aug 30 23:02:44 CEST 2009
Hi!
Igor Khavkine wrote:
> Hello. I've run into a bug in the following routine:
>
> src/float/dfloat/conv/cl_RA_to_double.cc : double_approx()
>
> A test case is attached. It is supposed to print the rational number
> 2/3 as a string, a float, and a double. On any 32-bit machine I've
> tried, it works perfectly. However, on 64-bit machines, I find that
> the conversion to double generates a segmentation fault.
>
> My version is cln-1.2.2. However, looking at the revision history of
> the relevant file, I don't see what would have fixed this in 1.3.0, so
> presumably the bug could still be there.
>
> It'd be great if someone could look into this. Thanks.
Thanks a lot for sending this concise bug report! I had a quick look at
it and found an assumption in cl_RA_to_double.cc which can indeed become
invalid on 64-bit systems. I'll do proper testing before committing. In
the meantime, could you, please, test if the attached patch works in
your cases? Thanks in advance!
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cln.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20090830/3df56844/attachment.patch>
More information about the CLN-list
mailing list