Page MenuHomePhabricator

D21567.id51351.diff
No OneTemporary

D21567.id51351.diff

diff --git a/support/startup/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php
--- a/support/startup/PhabricatorStartup.php
+++ b/support/startup/PhabricatorStartup.php
@@ -400,6 +400,24 @@
// a UTF-8 locale we can encounter problems when launching subprocesses
// which receive UTF-8 parameters in their command line argument list.
@setlocale(LC_ALL, 'en_US.UTF-8');
+
+ $config_map = array(
+ // See PHI1894. Keep "args" in exception backtraces.
+ '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: Arcanist applies a similar set of startup options for CLI
+ // environments in "init-script.php". Changes here may also be
+ // appropriate to apply there.
+ );
+
+ foreach ($config_map as $config_key => $config_value) {
+ ini_set($config_key, $config_value);
+ }
}

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 29, 9:16 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7637659
Default Alt Text
D21567.id51351.diff (1 KB)

Event Timeline