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
F17528507: D20554.diff
Thu, Jul 3, 8:06 AM
Unknown Object (File)
Thu, Jun 19, 3:00 AM
Unknown Object (File)
Wed, Jun 18, 3:34 AM
Unknown Object (File)
Tue, Jun 17, 10:53 AM
Unknown Object (File)
Tue, Jun 17, 10:23 AM
Unknown Object (File)
Tue, Jun 17, 1:56 AM
Unknown Object (File)
May 8 2025, 2:59 AM
Unknown Object (File)
May 7 2025, 11:28 PM
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
Branch
pcre1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22904
Build 31422: Run Core Tests
Build 31421: arc lint + arc unit