codegen: also set execute permissions for large codebuffers
a follow up from commit
5630bf33a46d9bf4
disasm: also label bad instructions
before:
0ad40017 ff 34 24 push dword ptr [esp]
0ad4001a ff ff (invalid opcode, byte=255)
0ad4001c 90 nop
after:
0a2f5017 ff 34 24 pushl (%esp)
0a2f501a jvm_insn: INVOKESPECIAL 3: [
0a2f501a]
0a2f501a java/lang/NullPointerException.<init>.()
returns Void: [
0a2f501a]
0a2f501a ff ff (invalid opcode, byte=255)
0a2f501c 90 nop
switched harpy to disassembler-0.1.0.99 (git@wien.tomnetworks.com:disassembler.git, hapry is now 0.4.3.99
codegen: explicit allocate codebuffer with proper permissions
we had weird issues, when upgrading ghc:
http://stackoverflow.com/questions/
10341943/ghc-segmentation-fault-under-strange-conditions
therefore, this fix: use `mprotect' to set the codebuffer explicitly executable.
`mprotect' requires aligned memory, so we use `memalign'.