Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102713 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15830 invoked from network); 10 Jul 2018 13:48:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 13:48:11 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.15 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.15 mout.gmx.net Received: from [212.227.15.15] ([212.227.15.15:37241] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/16-15421-519B44B5 for ; Tue, 10 Jul 2018 09:48:07 -0400 Received: from [192.168.2.101] ([79.222.41.233]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MexFh-1fSChV2kqP-00ObYn; Tue, 10 Jul 2018 15:48:00 +0200 To: Derick Rethans Cc: Nikita Popov , Jan Ehrhardt , PHP internals References: <15n3jdpoiprladjh50u6r2nn1hlmmvea3p@4ax.com> <87863116-5de1-c44d-d751-51e9327807f2@gmx.de> <66c6jdhurlnsaqlegs0epd56b7skj0n20v@4ax.com> <6fa23528-ddcd-d998-50cd-ddabcb038b45@gmx.de> <9274549c-4d08-7a68-77c3-aedfe6dc0962@gmx.de> <95d3db78-235e-ae54-4d24-8088914afad0@gmx.de> Message-ID: <1da47ccf-15a6-7691-1120-6293995431b7@gmx.de> Date: Tue, 10 Jul 2018 15:48:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Trans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2nuIrTVQVnXvGRWzFao036p7FG6X8TuYiYv2GeKZ6LApZWIviheug4sFpQ6Aj VAttMA1 Subject: Re: [PHP-DEV] Re: PHP 7.3 zif_handler changes From: cmbecker69@gmx.de ("Christoph M. Becker") On 09.07.2018 at 11:41, Derick Rethans wrote: > On Wed, 4 Jul 2018, Christoph M. Becker wrote: > >> On 04.07.2018 at 12:24, Nikita Popov wrote: >> >>> On Wed, Jul 4, 2018 at 11:32 AM, Christoph M. Becker >>> wrote: >>> >>>> On 04.07.2018 at 01:16, Jan Ehrhardt wrote: >>>> >>>>> Another one: some extensioms suffer from the fact that the macro GC_G >>>>> was removed from >>>>> https://github.com/php/php-src/blob/master/Zend/zend_gc.h >>>>> Some of the removed functionality has been reintroduced in gc_status >>>>> https://github.com/php/php-src/commits/master/Zend/zend_gc.h >>>>> >>>>> Examples using GC_G: v8js, xdebug, tideways. >>>>> v8js was using gc_active to check if garbage collection was running. >>>>> I did a wild guess to fix it: >>>>> https://github.com/Jan-E/v8js/commit/997df065d3cd06a9b11e399458c391 >>>> eb797a850e#diff-dc446a69201ccda44a33d111152f6c8c >>>> >>>> This looks wrong, since zend_gc_collect_cycles() actually triggers the >>>> GC, if I'm not mistaken. >>>> >>>> It seems to me that should be something like: >>>> >>>> zend_gc_status status; >>>> zend_gc_get_status(&status); >>>> if (status.runs) { >>>> >>> >>> The correct way to handle this is to implement a proper get_gc() handler, >>> which will be called in favor of get_properties() during GC. >> >> Ah, thanks! In some other cases, for instance, in Xdebug[1], using >> zend_gc_get_status() would be correct, wouldn't it? >> >> [1] >> > > It should be - care to make a patch? :-) Xdebug also doesn't do the hash > protections correctly yet. I've not had the time to make a fix for that > yet either (hint!) ;-) I'm already working on that. I'll submit a (partial?) PR ASAP. -- Christoph M. Becker