[pcre-dev] [Bug 2334] "make test" reports test failures when…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 2334] "make test" reports test failures when running on macOS (x86_64)
https://bugs.exim.org/show_bug.cgi?id=2334

--- Comment #13 from Rich Siegel <siegel@???> ---
Created attachment 1149
--> https://bugs.exim.org/attachment.cgi?id=1149&action=edit
revised patch for MAP_JIT usage on macOS systems

After back-and-forth with Apple developer tech support, here's the nutshell:

- on iOS, you are allowed to have only one MAP_JIT block, for the lifetime of
your process, period. (I don't know whether that means you can munmap() it and
make another. "Further study required.") This may create problems when trying
to use the JIT for multiple code sizes in PCRE. Above my pay grade. :-)

- on macOS, versions that support MAP_JIT have the same limitation as iOS; but
macOS 10.14 relaxes the restriction and allows multiple MAP_JIT blocks to
exist.

Thus, the fix for this issue is:

- when targeting macOS, *only* use MAP_JIT on kernel version 18.0 (OS 10.14.0)
and later.

- if targeting some other OS and MAP_JIT is defined, use it.

- otherwise don't.

I have attached a patch which implements this; with JIT enabled, "make test"
succeeds on my 10.13 test machine. Please verify that this builds and passes
tests on your own non-Mac systems. :-)

--
You are receiving this mail because:
You are on the CC list for the bug.