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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

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 21:01:29 2024 UTC