Bug #79693 [Opn]: Segmentation fault with preload of laminas-uri\laminas-validator

From: Date: Fri, 12 Jun 2020 07:30:43 +0000
Subject: Bug #79693 [Opn]: Segmentation fault with preload of laminas-uri\laminas-validator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227442@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79693&edit=1 ID: 79693 Updated by: nikic@php.net Reported by: maposov at adobe dot com Summary: Segmentation fault with preload of laminas-uri\laminas-validator Status: Open Type: Bug Package: opcache Operating System: MacOS Mojave 10.14.6 PHP Version: 7.4.7 Block user comment: N Private report: N New Comment: Just to double check, this does also occur on 7.4.7, not just 7.4.6? I remember fixing something that sounds very related (especially to the use of "static"). Previous Comments: ------------------------------------------------------------------------ [2020-06-11 23:58:16] maposov at adobe dot com Description: ------------ Nginx + php-fpm Reproduced with 7.4.5 and 7.4.6 Get segmentation fault with preloading of certain classes from laminas. That was detected as part of bigger project. Here is short way to reproduce it: - include laminas-uri\laminas-validator in your project "name": "laminas/laminas-validator", "version": "2.13.4", "name": "laminas/laminas-uri", "version": "2.7.1", - add following to preload: 100501 => '/path/vendor/laminas/laminas-uri/src/UriInterface.php', 100502 => '/path/vendor/laminas/laminas-uri/src/Uri.php', 100503 => '/path/vendor/laminas/laminas-validator/src/Translator/TranslatorAwareInterface.php', 100504 => '/path/vendor/laminas/laminas-validator/src/ValidatorInterface.php', 100505 => '/path/vendor/laminas/laminas-validator/src/AbstractValidator.php', 100506 => '/path/vendor/laminas/laminas-validator/src/Ip.php', 100507 => '/path/vendor/laminas/laminas-uri/src/Http.php', - add following to index.php $http = new \Laminas\Uri\Http(); $http->setHost("test"); - open index.php in browser Notes: removing 'static' from "static $regex = '/^\[.*\]$/';" (vendor/laminas/laminas-uri/src/Uri.php:1201) makes php-fpm working Expected result: ---------------- php-fpm continue to work Actual result: -------------- WARNING: [pool www] child 32757 exited on signal 11 (SIGSEGV) after 11.794965 seconds from start NOTICE: [pool www] child 32784 started ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79693&edit=1

« previous php.bugs (#227442) next »