You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5793 Reporter:@ppedrot Assigned to:@xclerc Status: closed (set by @xavierleroy on 2015-12-11T18:18:36Z) Resolution: fixed Priority: normal Severity: minor Fixed in version: 4.00.2+dev Category: standard library Related to:#5977
Bug description
When 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 reproduce
On 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.
The text was updated successfully, but these errors were encountered:
Original bug ID: 5793
Reporter: @ppedrot
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2015-12-11T18:18:36Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.00.2+dev
Category: standard library
Related to: #5977
Bug description
When 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 reproduce
On 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.
The text was updated successfully, but these errors were encountered: