Bug #71990 [Opn]: ArrayObject memory leak

From: Date: Fri, 08 Apr 2016 16:15:50 +0000
Subject: Bug #71990 [Opn]: ArrayObject memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200440@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71990&edit=1 ID: 71990 User updated by: littlexiang521 at gmail dot com Reported by: littlexiang521 at gmail dot com Summary: ArrayObject memory leak Status: Open Type: Bug Package: SPL related Operating System: CentOS / OSX PHP Version: 5.5.34 Block user comment: N Private report: N New Comment: It's works fine with php 7.0 latest Previous Comments: ------------------------------------------------------------------------ [2016-04-08 15:55:11] littlexiang521 at gmail dot com Description: ------------ if some class extends ArrayObject, in some circular reference conditions gc failed to recycle it. see codes below, if class B is a stdClass everything works fine Test script: --------------- https://0bin.net/paste/CvMSmhUeaKgaE1iU#eQLFPuTHJ56KeveFKaPWoTetXtq+qgeWw+uGDjVbhiU Expected result: ---------------- memory usage keeps low 9175040 9175040 9175040 9175040 9175040 9175040 9175040 9175040 9175040 9175040 9175040 9175040 Actual result: -------------- OOM... 121896960 122945536 124256256 125304832 126615552 127664128 128974848 130285568 131334144 132644864 133693440 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/data/songxiang/haojing/htdocs/pages/test_mem.php on line 40 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71990&edit=1

« previous php.bugs (#200440) next »