[MLton] Real.toString broken on 64 bit
Matthew Fluet
fluet at tti-c.org
Wed Nov 28 06:08:13 PST 2007
On Wed, 28 Nov 2007, Wesley W. Terpstra wrote:
> This works fine on 32 bit, but:
>> terpstra at tokyo:~$ ldd bug
>> libm.so.6 => /lib64/libm.so.6 (0x00002b88fd0d0000)
>> libgmp.so.3 => /lib64/libgmp.so.3 (0x00002b88fd252000)
>> libc.so.6 => /lib64/libc.so.6 (0x00002b88fd391000)
>> /lib64/ld-linux-x86-64.so.2 (0x00002b88fcfb8000)
>> terpstra at tokyo:~$ ./bug
>> Not 1: 2.68403211433E~112
>> terpstra at tokyo:~$ cat bug.sml
>> val () = print ("Not 1: " ^ Real.toString 1.0 ^ "\n")
>
> This is with svn/HEAD. I am not sure if it matters, but the default user
> space is 32 bit, but with 64 bit libraries in /lib64. The MLton used is a
> 32->64 bit cross compiler.
I see no problems with your examples:
[fluet at shadow bug-real]$ ldd z
linux-vdso.so.1 => (0x00007ffffc3fd000)
libm.so.6 => /lib64/libm.so.6 (0x00000031a9400000)
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00000031b5e00000)
libc.so.6 => /lib64/libc.so.6 (0x00000031a9000000)
/lib64/ld-linux-x86-64.so.2 (0x00000031a7e00000)
[fluet at shadow bug-real]$ ./z
Not 1: 1
[fluet at shadow bug-real]$ cat z.sml
val () = print ("Not 1: " ^ Real.toString 1.0 ^ "\n")
I suspect that something is wrong with your cross compiler.
More information about the MLton
mailing list