diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-18 10:15:53 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-18 10:15:53 +0200 |
commit | 3dfa25833fa44d5fa29bab6d489c9d46cffdb81a (patch) | |
tree | e981f4ecdd9e821058faf2033c27227349e676f8 /Zend | |
parent | 4c899fba41f5c16dafdd0ee5f12913282f471111 (diff) | |
download | php-git-3dfa25833fa44d5fa29bab6d489c9d46cffdb81a.tar.gz |
Don't use ternary in ini default
We use sizeof() on ini defaults, so this isn't safe. I can't reproduce
the failures locally, but I expect this to fix the asan jobs.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 2191ca8150..ed2e87812f 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -165,6 +165,12 @@ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */ } /* }}} */ +#if ZEND_DEBUG +# define SIGNAL_CHECK_DEFAULT "1" +#else +# define SIGNAL_CHECK_DEFAULT "0" +#endif + ZEND_INI_BEGIN() ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting) STD_ZEND_INI_ENTRY("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals) @@ -173,7 +179,7 @@ ZEND_INI_BEGIN() ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding) STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals) #ifdef ZEND_SIGNALS - STD_ZEND_INI_BOOLEAN("zend.signal_check", ZEND_DEBUG ? "1" : "0", ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals) + STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals) #endif STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals) ZEND_INI_END() |