ensure endian safety for non-little-endian machines
Reported by Nikias Bassen | November 8th, 2009 @ 10:25 PM | in 1.2.0 Release
I bet that parts of the libiphone code are not endian safe, esp. in the AFC implementation, e.g. when passing file offsets over to the device. For now, the values are just copied, but this would not work on big endian machines and perhaps break things on the device. I think we should resolve this before releasing 1.0
Comments and changes to this ticket
-
Nikias Bassen November 16th, 2009 @ 11:26 PM
- State changed from new to open
- Assigned user set to Matt Colyer
I did some investigation and found out that libiphone's code except AFC should be endian safe. For AFC a patch is attached that should make it work on big endian machines too. However I have no hardware to test it on, so perhaps somebody may verify this.
-
Matt Colyer November 18th, 2009 @ 03:22 AM
I need someone to test this on the proper machine before I can apply.
-
Martin S. November 19th, 2009 @ 01:02 PM
- Assigned user cleared.
- State changed from open to hold
- Milestone changed from 1.0 Release to 1.2.0 Release
Following options to test:
- Some QEMU image
- An older Mac
- ARM distro packages in big-endian mode
I think we can for sure hold this back until we have properly tested it.
As whatever issues it might cause, it still won't affect the public API, only private code.If anyone takes the challenge to make it run on a big endian machine, he'll sure be able to verify this patch and libiphone functionality.
Once verified we can then ship a new release with the internals taking endianness into account which should easily be possible past 1.0.
Moving this on hold unless someone comes up with a test of course. :)
-
Matt Colyer December 1st, 2009 @ 05:01 AM
- State changed from hold to resolved
(from [12a44afce569c2cdf31018c259745e09b13bffc3]) added endian safety to AFC
This should make libiphone compatible with big endian machines.
[#85 state:resolved]
Signed-off-by: Matt Colyer matt@colyer.name
http://github.com/MattColyer/libiphone/commit/12a44afce569c2cdf3101... -
Matt Colyer December 1st, 2009 @ 05:02 AM
- State changed from resolved to hold
Applied this to resolve #82.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org
People watching this ticket
Attachments
Tags
Referenced by
- 82 Use correct types in AFC read/write signatures for length I just noticed I made these patches on top of my endianes...
- 82 Use correct types in AFC read/write signatures for length I just noticed I made these patches on top of my endianes...
- 85 ensure endian safety for non-little-endian machines [#85 state:resolved]