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
F18141039: D20554.diff
Thu, Aug 14, 5:49 AM
F18108283: D20554.id49031.diff
Mon, Aug 11, 6:02 AM
F18100548: D20554.diff
Sat, Aug 9, 11:56 AM
F17845222: D20554.id.diff
Jul 27 2025, 3:11 AM
F17829389: D20554.id49033.diff
Jul 26 2025, 10:04 AM
F17823937: D20554.diff
Jul 26 2025, 5:00 AM
Unknown Object (File)
Jul 3 2025, 8:06 AM
Unknown Object (File)
Jun 19 2025, 3:00 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