• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EXC_BAD_ACCESS in NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXC_BAD_ACCESS in NSData


  • Subject: Re: EXC_BAD_ACCESS in NSData
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 28 May 2014 23:38:28 -0500

On May 28, 2014, at 11:24 PM, Uli Kusterer <email@hidden> wrote:

> Or change struct alignment or the size of ints or … I’ve been programming for a couple of days, I’ve taken this into account. But I’d rather retroactively go and fix something (you have to re-test when porting to a new platform anyway) than go all architecture astronaut and prepare for changes in ABI that may or may never happen. In a well-architected code-base, the code that is affected by endian-ness is separate from the other code anyway.

The time taken to add a simple CFSwapInt(16|32|64)(Big|Little)ToHost is pretty much trivial. It's not "architecture astronaut" in the least, and it's certainly less work than fixing this crap after the fact, and you end up with something that is actually semantically correct.

> That said, if you want to be really endian-safe, use an XML file format saved as UTF-8 like Property Lists. Most portable format there is. :-)

Oh, no argument from me. Sometimes you don't control the format, though.

Charles

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >EXC_BAD_ACCESS in NSData (From: Pax <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Uli Kusterer <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Pax <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Roland King <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Graham Cox <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Uli Kusterer <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Charles Srstka <email@hidden>)
 >Re: EXC_BAD_ACCESS in NSData (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS in NSData
  • Next by Date: Re: EXC_BAD_ACCESS in NSData
  • Previous by thread: Re: EXC_BAD_ACCESS in NSData
  • Next by thread: Re: EXC_BAD_ACCESS in NSData
  • Index(es):
    • Date
    • Thread