php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 + 6 = ?
Subscribe to this entry?

 
 [2019-01-08 01:38 UTC] drealecs at gmail dot com
Description:
------------
It seems that when there are many objects in memory with circular references and garbage collector cycle is triggered, it will segfault.

Test script:
---------------
https://3v4l.org/3PniX


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-08 09:25 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2019-01-08 09:25 UTC] nikic@php.net
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: https://3v4l.org/EJCaI

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 20:01:30 2024 UTC