03-04-2013, 02:15 PM
(This post was last modified: 03-04-2013, 02:56 PM by the avenger.)
(03-04-2013, 02:03 PM)rock88 Wrote: Maybe jit crashing happens because use mmap for allocating memory? This example working for me, also when set (PROT_READ | PROT_EXEC | PROT_WRITE) in mprotect.this might save the day
Although even allocation through malloc still crash..
http://reverse.put.as/wp-content/uploads...igning.pdf
jit startes from page 39 of this all the way down
edit:also this is probably why giving it the dynamic-codesign entitlement didn't work
taken from somewhere:whereby pages can either be read/write or read/execute. Unfortunately the majority of existing JIT engines expect RWX in order to patch executable pages without the need to change the state from rx » rw, patch code and then rw » rx. Critical in multi-threaded scenarios, as code could conceivably jump to a page that was being patched and fault due to the absence of the execute flag.

