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/>