Page MenuHomePhabricator

Disable PHP config option "pcre.jit" to work around PCRE segfault after "fork()"
ClosedPublic

Authored by epriestley on May 23 2019, 11:36 PM.
Tags
None
Referenced Files
F19048983: D20554.diff
Thu, Nov 27, 3:49 PM
F19048966: D20554.diff
Thu, Nov 27, 3:48 PM
F19048822: D20554.diff
Thu, Nov 27, 3:31 PM
F18985113: D20554.id49031.diff
Mon, Nov 17, 12:53 PM
F18867778: D20554.id.diff
Tue, Nov 4, 2:36 AM
F18808803: D20554.id49033.diff
Oct 19 2025, 8:44 AM
F18744999: D20554.id49031.diff
Oct 3 2025, 4:54 AM
F18740397: D20554.diff
Oct 2 2025, 2:28 AM
Subscribers
None

Details

Summary

Ref T13296. On macOS with PHP 7.3.x, PCRE can segfault during calls to "preg_match()" or during process shutdown.

Disabling "pcre.jit" appears to work around this issue. Some casual Googling suggests that the JIT does not dramatically improve performance (~10%?) and we aren't PCRE-bound anyway, so prefer "not crashing" over "questionable performance improvements" on all systems for now.

Test Plan
  • See T13296 for details.
  • Ran bin/phd start on macOS with PHP 7.3.1.
  • Before patch: daemons don't actually start.
  • After patch: daemons start.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable