Bug #79693 [NEW]: Segmentation fault with preload of laminas-uri\laminas-validator
| From: | maposov at adobe dot com | Date: | Thu, 11 Jun 2020 23:58:16 +0000 |
| Subject: | Bug #79693 [NEW]: Segmentation fault with preload of laminas-uri\laminas-validator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227432@lists.php.net to get a copy of this message | ||
From: maposov at adobe dot com
Operating system: MacOS Mojave 10.14.6
PHP version: 7.4.7
Package: opcache
Bug Type: Bug
Bug description:Segmentation fault with preload of laminas-uri\laminas-validator
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 bug report at https://bugs.php.net/bug.php?id=79693&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79693&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79693&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79693&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79693&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79693&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79693&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79693&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79693&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79693&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79693&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79693&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79693&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79693&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79693&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79693&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79693&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79693&r=mysqlcfg