Bug #78514 [Ver->Asn]: Preloading segfaults
| From: | nikic@php.net | Date: | Mon, 09 Sep 2019 09:28:37 +0000 |
| Subject: | Bug #78514 [Ver->Asn]: Preloading segfaults | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222636@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78514&edit=1
ID: 78514
Updated by: nikic@php.net
Reported by: kocsismate at woohoolabs dot com
Summary: Preloading segfaults
-Status: Verified
+Status: Assigned
Type: Bug
-Package: Unknown/Other Function
+Package: opcache
Operating System: Alpine Linux 3.10
PHP Version: 7.4.0RC1
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
I believe what happens here is that a class-typed property is inherited and shared by two classes.
We translate the class to SHM when visiting one class and then try to do it again when visiting the
second, at which point the xlat lookup fails.
Previous Comments:
------------------------------------------------------------------------
[2019-09-09 09:00:03] nikic@php.net
php: /home/nikic/php-7.4/ext/opcache/zend_persist.c:934: zend_update_parent_ce: Assertion `ce'
failed.
------------------------------------------------------------------------
[2019-09-08 20:02:40] kocsismate at woohoolabs dot com
Description:
------------
I tried out preloading by generating the preload file for a personal project of mine using my DI
container (https://github.com/woohoolabs/zen#generating-a-preload-file).
After some struggle, I got it work, so I managed to preload all the files I wanted with PHP 7.4 beta
1 (via Docker). However, something could happen after some time because preloading stopped working,
and I got a segfault on each PHP startup.
I don't know if it is only a coincidence, but the first time I noticed it is around when I
introduced property type declarations everywhere in my app and in some of my open-source libraries
(which are also preloaded).
Now, that I still have this problem on PHP 7.4 RC1, I thought it's time to report it.
Test script:
---------------
This is the most minimal example I could come up with:
- Download and unzip the following gist: https://gist.github.com/kocsismate/d7f71f5da9e1cefbbdbee040b49c1984
- Run "composer install"
- Run "docker-compose up"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78514&edit=1