this post was submitted on 11 Jul 2025
1 points (100.0% liked)

OCaml

97 readers
1 users here now

A community for the OCaml programming language https://ocaml.org/

Looking for mods, if you want to mod the community feel free to dm Ategon

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

This allocates required number of pages using mmap, fills it with AMD64 instructions, changes the memory protections and execute the memory as code.

This works fine on my machine, but I'm not sure if it's guaranteed to work in all cases. I assume it's safe to execute arbitrary asm code from OCaml. I'm not sure if the conversions I do are valid.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here