Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005793OCamlOCaml standard librarypublic2012-10-17 17:562013-04-09 14:05
Reporterppedrot 
Assigned Toxclerc 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.00.2+dev 
Summary0005793: Integer marshalling is inconsistent between architectures
DescriptionWhen marshalling integers between 32 and 64-bits architectures, integers which are inbetween 2^31 and 2^32 - 1 are treated in a inconsistent way.

In particular, 64-bit architectures marshal them as 32-bit integers, while 32-bit architectures unmarshal them as if they were only 31-bit long, thus resulting in an silent overflow.
Steps To ReproduceOn a 64-bit arch, retrieve the string produced by the following command:

Marshal.to_string (1 lsl 30) []

Then on a 32-bit arch, unmarshal the previous string. This results in an overflow.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005977resolvedfrisch Build failure on raspberry pi: "input_value: integer too large" 

-  Notes
(0008757)
xclerc (developer)
2013-01-16 09:36

Fixed in both '4.00' (revision 13242) and trunk (revision 13241) branches.

- Issue History
Date Modified Username Field Change
2012-10-17 17:56 ppedrot New Issue
2012-11-07 13:37 xclerc Assigned To => xclerc
2012-11-07 13:37 xclerc Status new => assigned
2013-01-16 09:36 xclerc Note Added: 0008757
2013-01-16 09:36 xclerc Status assigned => resolved
2013-01-16 09:36 xclerc Fixed in Version => 4.00.2+dev
2013-01-16 09:36 xclerc Resolution open => fixed
2013-04-09 14:05 frisch Relationship added related to 0005977


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker