Bug #75729 [Csd]: opcache segfault when installing Bitrix

From: Date: Sat, 24 Mar 2018 11:44:53 +0000
Subject: Bug #75729 [Csd]: opcache segfault when installing Bitrix
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214462@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75729&edit=1 ID: 75729 User updated by: chipitsine at gmail dot com Reported by: chipitsine at gmail dot com Summary: opcache segfault when installing Bitrix Status: Closed Type: Bug Package: opcache Operating System: centos 7 PHP Version: 7.2.1RC1 Block user comment: N Private report: N New Comment: wow Previous Comments: ------------------------------------------------------------------------ [2018-03-24 09:09:51] info at ihead dot ru In patch http://git.php.net/?p=php-src.git;a=commit;h=d9e71169e6c0d8cd33e44f5e6a1d1ec3926f3362 changed code in condition num_args == 2 substr can recieve 3 args, so it is necessary to change the corresponging code in num_args == 3 --- sccp.c.orig 2018-02-27 19:33:06.000000000 +0300 +++ sccp.c 2018-03-24 12:01:08.808825000 +0300 @@ -820,7 +820,8 @@ } else if (zend_string_equals_literal(name, "substr")) { if (Z_TYPE_P(args[0]) != IS_STRING || Z_TYPE_P(args[1]) != IS_LONG - || Z_TYPE_P(args[2]) != IS_LONG) { + || Z_TYPE_P(args[2]) != IS_LONG + || (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) { return FAILURE; } /* pass */ ------------------------------------------------------------------------ [2018-03-24 08:43:11] info at ihead dot ru I found the code which cause segfault: echo substr(PHP_OS, 0, 3); ------------------------------------------------------------------------ [2018-03-23 19:41:18] info at ihead dot ru PHP 7.2.3, FreeBSD 11.1 Problem exists in PHP 7.2.3. I got segmentation fault when installing 1C-Bitrix (http://www.1c-bitrix.ru/download/scripts/bitrixsetup.php) with mbstring.func_overload=2 after submitting form with database connection parameters. ------------------------------------------------------------------------ [2018-02-05 20:11:18] nikic@php.net Automatic comment on behalf of nikita.ppv@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=d9e71169e6c0d8cd33e44f5e6a1d1ec3926f3362 Log: Fixed bug #75729 ------------------------------------------------------------------------ [2017-12-26 17:50:48] chipitsine at gmail dot com Note: bitrix requires the following settings mbstring.func_overload=2 mbstring.internal_encoding=UTF-8 it turns out that them crash opcache. without those setting opcache works ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75729 -- Edit this bug report at https://bugs.php.net/bug.php?id=75729&edit=1

« previous php.bugs (#214462) next »