mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-09 16:32:39 +01:00
Apply "pcre.*_limit" config options at startup in CLI environments
Summary: Ref T13100. Ref T13586. These options have been in production for a while and seem to consistently improve behavior, downgrading segfaults to runtime errors. Make them global options for all CLI environments. See next change for web enviornments. Test Plan: Ran `arc`. Maniphest Tasks: T13586, T13100 Differential Revision: https://secure.phabricator.com/D21566
This commit is contained in:
parent
9d5802cb9f
commit
e95afd1d00
1 changed files with 9 additions and 2 deletions
|
@ -56,6 +56,15 @@ function __arcanist_init_script__() {
|
||||||
// inspect "args", and this option generally obscures useful debugging
|
// inspect "args", and this option generally obscures useful debugging
|
||||||
// information without any benefit in the context of Phabricator.
|
// information without any benefit in the context of Phabricator.
|
||||||
'zend.exception_ignore_args' => 0,
|
'zend.exception_ignore_args' => 0,
|
||||||
|
|
||||||
|
// See T13100. We'd like the regex engine to fail, rather than segfault,
|
||||||
|
// if handed a pathological regular expression.
|
||||||
|
'pcre.backtrack_limit' => 10000,
|
||||||
|
'pcre.recusion_limit' => 10000,
|
||||||
|
|
||||||
|
// NOTE: Phabricator applies a similar set of startup options for Web
|
||||||
|
// environments in "PhabricatorStartup". Changes here may also be
|
||||||
|
// appropriate to apply there.
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($config_map as $config_key => $config_value) {
|
foreach ($config_map as $config_key => $config_value) {
|
||||||
|
@ -106,8 +115,6 @@ function __arcanist_init_script__() {
|
||||||
|
|
||||||
PhutilErrorHandler::initialize();
|
PhutilErrorHandler::initialize();
|
||||||
|
|
||||||
PhutilErrorHandler::initialize();
|
|
||||||
|
|
||||||
// If "variables_order" excludes "E", silently repair it so that $_ENV has
|
// If "variables_order" excludes "E", silently repair it so that $_ENV has
|
||||||
// the values we expect.
|
// the values we expect.
|
||||||
PhutilExecutionEnvironment::repairMissingVariablesOrder();
|
PhutilExecutionEnvironment::repairMissingVariablesOrder();
|
||||||
|
|
Loading…
Reference in a new issue