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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: drealecs at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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 Nov 21 17:01:32 2024 UTC