Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006027OCamlOCaml documentationpublic2013-05-31 16:042013-06-10 15:11
ReporterSpiceGuid 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version4.00.1 
Target VersionFixed in Version 
Summary0006027: Undocumented portability of Marshal.to_channel
DescriptionThe portability of Marshal.to_channel/from_channel between 32bits and 64 bits platforms is totally obscure/undocumented.

? Is there absolutely NO guarantee ? (it should be documented)
? Is there some guarantee from 32bits to 64 bits ? (it would be great to know)
? Is there some guarantee from 32bits to 64 bits if some restriction applies? (it would be great to know)
? Is there some guarantee both ways ? (it would be great to know)
? Is there some guarantee both ways if some restriction applies? (it would be great to know)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009452)
xleroy (administrator)
2013-06-10 15:11

The SVN trunk, soon to become OCaml 4.01, contains a little more relevant documentation in the Marshal module, related to the introduction of the Compat_32 flag. I'm not sure we need more documentation than this, hence the "resolved/suspended" resolution.

For the record:

> Is there absolutely NO guarantee ? (it should be documented)

We guarantee best effort, in the sense described below.

> Is there some guarantee from 32bits to 64 bits ? (it would be great to know)

Yes, all data marshaled on a 32-bit host can be unmarshaled on a 64-bit host.

> Is there some guarantee from 32bits to 64 bits if some restriction applies? (it would be great to know)

N/A

> Is there some guarantee both ways ? (it would be great to know)

No, because there are 64-bit values that simply cannot be recreated on a 32-bit host: integers (type "int") outside [-2^30,-2^30), strings and arrays above a certain size, etc.

> Is there some guarantee both ways if some restriction applies? (it would be great to know)

The "guarantee both ways" is that if your data is representable both in 32 bits and in 64 bits, it is preserved by marshaling and unmarshaling. Otherwise, unmarshaling on a 32-bit host will raise an exception. Alternatively, starting with 4.01, you can set the Compat_32 flag when marshaling, and then the error occurs at marshaling time.

- Issue History
Date Modified Username Field Change
2013-05-31 16:04 SpiceGuid New Issue
2013-06-10 15:11 xleroy Note Added: 0009452
2013-06-10 15:11 xleroy Status new => resolved
2013-06-10 15:11 xleroy Resolution open => suspended


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker