News for hackers. Stuff that matters.
Re:Introducing the Gmail app for iPhone, iPad and iPod touch by xtacy on Wednesday November 02, 2011 @03:51PM (#3188646)
Would you need executable and writable at the same time? The JIT generates code into a writable+non-executable memory, and then makes it readonly+executable.
Re:Introducing the Gmail app for iPhone, iPad and iPod touch by pilif on Wednesday November 02, 2011 @04:03PM (#3188688)
That's the point. You don't get segments that you can mark as executable if you are a third-party app. The only code that's executable is the code segment of the compiled binary (that's signed by apple and won't be executed if it has changed since it has been signed).

Trying to mark memory as executable will cause your app to be terminated. Jumping into non-executable memory will also cause your app to be terminated.

Aside of protecting you (as a user or as a developer) from a big class of security issues, this also ensures that nobody ever gets to run code that's not loaded from the App Store (and thus would generate revenue without giving a share to Apple).