Bug #65340 [Com]: Memory leak when using magic __set ?

From: Date: Thu, 16 Feb 2017 12:25:39 +0000
Subject: Bug #65340 [Com]: Memory leak when using magic __set ?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207406@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65340&edit=1 ID: 65340 Comment by: ealexs at gmail dot com Reported by: vitalif at mail dot ru Summary: Memory leak when using magic __set ? Status: Closed Type: Bug Package: Class/Object related Operating System: Linux PHP Version: 5.5.1 Assigned To: nikic Block user comment: N Private report: N New Comment: Can you please explain: "no recursion over different property names". You mean the magic setter should not trigger another magic setter ? Would this apply on the object itself ($this) or it can also affect other objects ? Thanks, Alex Previous Comments: ------------------------------------------------------------------------ [2017-02-16 11:35:27] nikic@php.net Related To: Bug #74072 ------------------------------------------------------------------------ [2017-02-16 11:35:02] nikic@php.net This issue has been fixed in PHP 7.1. Memory usage should now be constant for typical uses (no recursion over different property names) of magic getters/setters. ------------------------------------------------------------------------ [2015-08-28 21:30:14] vitalif at mail dot ru But of course it's still a bug? :) ------------------------------------------------------------------------ [2015-08-28 21:21:18] nikic@php.net The reason for this are property recursion guards. In PHP 5 32bit these take 72 bytes per distinct property name that was used with __get/etc. so in this case it would be 72*500000 bytes, which matches your numbers. ------------------------------------------------------------------------ [2015-03-19 12:12:27] php at bof dot de Just tested with 5.6.7, issue is reproducible. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65340 -- Edit this bug report at https://bugs.php.net/bug.php?id=65340&edit=1

« previous php.bugs (#207406) next »