|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77427 Garbage collector segmentation fault with many circular references
Submitted: 2019-01-08 01:38 UTC Modified: 2019-01-08 10:56 UTC
From: drealecs at gmail dot com Assigned:
Status: Duplicate Package: *General Issues
PHP Version: All versions OS:
Private report: No CVE-ID: None
 [2019-01-08 01:38 UTC] drealecs at gmail dot com
It seems that when there are many objects in memory with circular references and garbage collector cycle is triggered, it will segfault.

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-08 09:25 UTC]
-Status: Open +Status: Duplicate
 [2019-01-08 09:25 UTC]
Duplicate of bug #77345, GC recursion causes stackoverflow. Only happens since 7.3 as GC can now run on much more objects.
 [2019-01-08 10:56 UTC] drealecs at gmail dot com
-PHP Version: 7.3.0 +PHP Version: All versions
 [2019-01-08 10:56 UTC] drealecs at gmail dot com
I didn't mentioned correctly, the error is present since long time ago if you set the right number of objects:
Doubling it fails for all version:

I'm not sure that it is the same problem...
The script I provided fails very fast, even if it is more complex.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Oct 03 17:05:53 2022 UTC