-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SELinux or PaX/grsecurity based kernels may deny creating writable and executable mappings, leading to errors when trying to allocate JIT memory, even though JIT support is generally available. Instead of failing hard in this case, allow to use the interpreter fallback by probing and announcing the availability of JIT mode at runtime through the PCRE2_CONFIG_JIT hook. This only happens for configurations using only the default JIT memory allocator, i.e. not the SELinux aware one. However, we still mark the latter as experimental and distributions like Debian don't enable it. The current behaviour leads to nasty user visible errors on such systems, e.g. when running 'git grep': $ git grep peach fatal: Couldn't JIT the PCRE2 pattern 'peach', got '-48' With this change in place, it'll fall back to the interpreter and "just work", providing a much more pleasant user experience. Signed-off-by: Mathias Krause <[email protected]>
- Loading branch information
1 parent
c833353
commit 9dee7e8
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters