sljit
sljit copied to clipboard
Prot exec fixes
This PR fixes an assertion / memory corruption in the protexec allocator as well as adding a function to detect missing support to create rwx mappings for the exec allocator. The latter is intended to be used by downstream users to fall back to the interpreter mode in this case.
Arguably, the proper solution would be to use the protexec allocator instead, but, unfortunately, not all distros do that. Case in point would be Debian configuring libpcre2 with the exec allocator only, making use cases like git grep
fail hard on such hardened systems.
I also sent a PR to pcre2
to make use of the runtime detection function to implement the mentioned fallback functionality.