Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

iOS doesn't allow writable pages to be executed. As I recall that was one reason why Android 2.2's V8 javascript JIT was so much faster than iOS's.

Also, use of dlopen() is not allowed. A long time ago I heard of two AR apps that used it (they dynamically linked against CoreSurface, to copy the bits from the camera preview into an opengl texture) but I haven't heard of anyone sneaking an app using dlopen() into the store in over a year.



hence "to ever be executable", they don't need to be writable and executable, as long as at one point they are writable (for you to dump your code in), then at some point they're executable (writable or otherwise).

as for dlopen(), you could just compile that directly into your app rather than using it from libc/libdl, bypassing that limitation entirely.


On non-jailbroken iOS you can't mark a section of memory as executable once it has been writable (and vice-versa, apparently). Executable pages are also checked against a signature by the kernel before they're used.


that's pretty incredible, I'm genuinely surprised.

I suppose it's possible when you start from scratch, there's no way they could do that on the Mac.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: