|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78514 Preloading segfaults with inherited typed property
Submitted: 2019-09-08 20:02 UTC Modified: 2019-09-09 09:36 UTC
From: kocsismate at woohoolabs dot com Assigned: nikic (profile)
Status: Closed Package: opcache
PHP Version: 7.4.0RC1 OS: Alpine Linux 3.10
Private report: No CVE-ID: None
 [2019-09-08 20:02 UTC] kocsismate at woohoolabs dot com
I tried out preloading by generating the preload file for a personal project of mine using my DI container (

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:
- Run "composer install"
- Run "docker-compose up"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-09 09:00 UTC]
-Status: Open +Status: Verified
 [2019-09-09 09:00 UTC]
php: /home/nikic/php-7.4/ext/opcache/zend_persist.c:934: zend_update_parent_ce: Assertion `ce' failed.
 [2019-09-09 09:28 UTC]
-Status: Verified +Status: Assigned -Package: Unknown/Other Function +Package: opcache -Assigned To: +Assigned To: nikic
 [2019-09-09 09:28 UTC]
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.
 [2019-09-09 09:36 UTC]
-Summary: Preloading segfaults +Summary: Preloading segfaults with inherited typed property
 [2019-09-09 09:37 UTC]
Automatic comment on behalf of
Log: Fixed bug #78514
 [2019-09-09 09:37 UTC]
-Status: Assigned +Status: Closed
 [2019-09-09 11:51 UTC] kocsismate at woohoolabs dot com
Thank you, Nikita, for your quick response and fix! :)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 23:01:30 2024 UTC