[
https://issues.apache.org/jira/browse/THRIFT-2180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14350362#comment-14350362
]
Jeremy W. Sherman commented on THRIFT-2180:
-------------------------------------------
Hi Luca,
It sounds like I introduced an endian issue while reading. I suspect there are
a many more, but this has the unfortunate distinction of being the only one
that falls on the wrong side of the divide for little-endian devices.
I'm going to go back to removing the union in favor of rotates and masks,
provided I can get it not to trigger compiler warnings about signedness and
similar.
I'd like to add a test that would catch this in future, though. The write issue
should be very testable, as that is demonstrably wrong; the read issue is
subtler, and I don't have a plan for how to run a test where the machine
pretends to be big-endian/little-endian as needed.
> Integer types issues in Cocoa lib on ARM64
> ------------------------------------------
>
> Key: THRIFT-2180
> URL: https://issues.apache.org/jira/browse/THRIFT-2180
> Project: Thrift
> Issue Type: Bug
> Components: Cocoa - Library
> Affects Versions: 0.9.1
> Environment: ARM64, iOS, xcode5
> Reporter: Sébastien martini
>
> When compiling the Cocoa library (using the current master) for iOS on ARM64,
> xcode5 highlights several integer types warnings.
> Several of these instances are originated from the issue that the [NSData
> length] method returns an NSUInteger which is an unsigned long on ARM64 and
> is often assigned to an int (int32) in the Cocoa lib.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)