Euphoria
Ticket #742:
F10B case in be_decompress will not properly decode on ARM (and possibly others)
-
Reported by
SDPringle
Jan 21, 2012
The F10B case will not properly decompress on compilers that do not support 10 byte long doubles. This case will not be encountered except when shrouding code from a 64-bit machine is used on a 32-bit machine that has no long doubles.
Consider long doubles can be longer (for padding) or shorter (for lack of support) than 10 bytes. There is no code to convert from 80-bit to 64-bit under ARM.
Details
1. Comment by mattlewis
Feb 28, 2013
Updating milestone to 4.1, since 4.0 does not support ARM.
2. Comment by jimcbrown
Feb 28, 2013
The reported revision is incorrect as well - 4.0.3 didn't run on arm either.
3. Comment by mattlewis
Mar 01, 2013
Yeah, but if it didn't run at all, then it also didn't decompress F10Bs correctly.
4. Comment by mattlewis
Mar 01, 2013
be_decompress should never see 80bit FPs on chips that don't have them. std/serialize.e might. That uses float80_to_atom(), which mostly works on 32-bit ARM. It uses a manual technique that passes tests, except for some special values like infinity and NaN.
Since 4.0 is x86 only, this is really a 4.1 issue (as reflected in the milestone).
5. Comment by SDPringle
Aug 28, 2013
If someone distributes a shrouded file that was produced on a 64-bit platform. Could that not possibly have an 80-bit fp value? If it could and it were distributed to a 32-bit level, this 32-bit processor would decode this value wrongly.
6. Comment by mattlewis
Aug 29, 2013
Shrouded code is not platform or architecturally portable.
7. Comment by jimcbrown
Aug 29, 2013
So can we close this ticket now then? Seems like float80_to_atom() covers all the bases...
8. Comment by SDPringle
Sep 01, 2013
Yes, we should close this since shrouded code is not supposed to be portable. Closing as 'invalid'.