|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79693 Segmentation fault with preload of laminas-uri\laminas-validator
Submitted: 2020-06-11 23:58 UTC Modified: 2020-06-12 22:22 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: maposov at adobe dot com Assigned:
Status: Closed Package: opcache
PHP Version: 7.4.6 OS: MacOS Mojave 10.14.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: maposov at adobe dot com
New email:
PHP Version: OS:


 [2020-06-11 23:58 UTC] maposov at adobe dot com
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();
- open index.php in browser

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-12 07:30 UTC]
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").
 [2020-06-12 22:16 UTC] maposov at adobe dot com
Just in time! :)
Did not have upgrade for to 7.4.7 yesterday for Mac.
I can confirm that I could not reproduce it with 7.4.7 on Mac and php:7.4.7-fpm docker
 [2020-06-12 22:19 UTC] maposov at adobe dot com
(for history: it can be reproduced on 7.4.5 and 7.4.6)
 [2020-06-12 22:22 UTC] maposov at adobe dot com
-Status: Open +Status: Closed -PHP Version: 7.4.7 +PHP Version: 7.4.6
 [2020-06-12 22:22 UTC] maposov at adobe dot com
fixed in 7.4.7
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 03:01:28 2024 UTC