Bug in mlnlffigen on Win64 (bad size for 'long')

Nicolas Bertolotti <[email protected]> Thu, 21 Jun 2012 13:25:27 +0000
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <FC2BB2BC70EE624E9E02E4AD03CF4C274650535B@exmb-01-uk.ad.mathworks.com>
Hi,

I just noticed that 'mlnlffigen' generated wrong data on Win64 for the C type 'long'.

On Win64, a 'long' is 32 bits but 'mlnlffigen' always assumes 64 bits for the 'amd64' processor. It uses a file sizes-amd64.sml which is not automatically generated and whose behaviour does not depend on the operating system.

I fixed the issue in my personal build by adding a file sizes-amd64-mingw.sml and referencing it rather than sizes-amd64.sml in control.sml when the target is Win64.

Anyway, it seems that this file was automatically generated in the original (SML/NJ) version so I guess a more robust fix could be implemented.

Regards

Nicolas

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
MLton-devel mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-devel