Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFH: let us know if PCRE2 with JIT will work for you



On Tue, Nov 28, 2023 at 10:52 AM Martin Husemann <martin%duskware.de@localhost> wrote:
>
> On Wed, Nov 29, 2023 at 07:49:15AM +1300, Lloyd Parkes wrote:
> > No need. I got the test to pass. I forgot to run paxctl +m on the
> > pcre2_jit_test binary.
>
> This is bad, sljit needs to do the remap dance to avoid W+X mappings.

It does, but you will need to compile it with:

$ gmake EXTRA_CPPFLAGS=-DSLJIT_PROT_EXECUTABLE_ALLOCATOR

Note though that doing so, is not recommended because the resulting
"library" is not fork() safe because of {kern,lib}/l55177[1], and
indeed using `paxctl` to add an exception for your PCRE2 using binary
is the best approach IMHO.

Carlo

PS, in PCRE2 you can get the same effect by adding
`--enable-jit-sealloc`, which was AFAIK used by pkgsrc for a while and
that is "supported" in Linux and NetBSD because of that but is known
to have problems[2].

[1] https://gnats.netbsd.org/55177
[2] https://github.com/PCRE2Project/pcre2/issues/162


Home | Main Index | Thread Index | Old Index