Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95001 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96866 invoked from network); 10 Aug 2016 11:38:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2016 11:38:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.43 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.214.43 mail-it0-f43.google.com Received: from [209.85.214.43] ([209.85.214.43:37061] helo=mail-it0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/B4-08042-C121BA75 for ; Wed, 10 Aug 2016 07:38:05 -0400 Received: by mail-it0-f43.google.com with SMTP id f6so41355523ith.0 for ; Wed, 10 Aug 2016 04:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WOg+ZZXasrSoZ0iMFKE2CSW3F1uD+5o1TNd3/T7Vkgo=; b=IOaP3B3t9xM+OUBmDEn3c7UmE2yGqxyb5m6+DHN5at59JKO2qeO6PahieXarpiPTq8 Xyp4OJUKc0RWUnIWCy6EQSbF9hQ5EsDodcdrPMnTpXnvnTZgXXzMs5Uo9klM3gig5d6U KvBQibiUirA6qJYQXE1qEjs/BNhalE1kksGG+TYfhy3pnzS5wLlrKmdfSG6kbgOGld65 YqQMo7GcRGsxA/Va6hL7VOAfbh4up35hXnnQJrBfKJ9huwawY5R4MdmB2N3GFL0jDlw4 foSJM0VSSCWCtDXvc0P6N6d1jML4ixU3Elz1VW3R7MhDOYI9gLMc9iQMMHOPs6OPAatw fY7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=WOg+ZZXasrSoZ0iMFKE2CSW3F1uD+5o1TNd3/T7Vkgo=; b=bsF9f4KGgdjhT6tIn7rtth9JzxdGAR9xjW2BUZv++aPs5A274BpAdWnbEY068ELbnL 46p28lRiNW8YQg9lsPd3LnYKNrScAjvvrsiCgVdifcX+9y6uzYVavhbr+p9vnUY82Pw+ XjXYn2H39w74kv4P4Zf7FDLQ5hxETPknT4xveKumrmfu99B78tpT6/uIM2HyD/mEv9YY R1nDj5SVkSrfM+6bTh8dkBSQpV+JgSeSr2dooFrn0t0IHb0i4GK6EchSxaakrYSuBU6Z Brpngy8goAMLgpUkpYtt7m0EJU9r+FfQf09lZ16WF7XCGVaCNOidbJbY1x2lGZkSyqYy YvvQ== X-Gm-Message-State: AEkoouuER6Xqv8Oc0kiR0l52Q+MMt/XdLIwOrqZ/uwPyImF3AQbJGCDR3yCyXl1uSKWic3rAznn2PtZ6pTv8zQ== X-Received: by 10.36.66.2 with SMTP id i2mr2453962itb.53.1470829081765; Wed, 10 Aug 2016 04:38:01 -0700 (PDT) MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.107.48.77 with HTTP; Wed, 10 Aug 2016 04:38:01 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Aug 2016 13:38:01 +0200 X-Google-Sender-Auth: qEsqJgnbJtrAZW9Pyk3VHEukZj8 Message-ID: To: Nikita Popov Cc: "Christoph M. Becker" , PHP Internals List Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] GC issue wrt. to resource <-> object cycles? From: kalle@php.net (Kalle Sommer Nielsen) 2016-08-10 12:59 GMT+02:00 Nikita Popov : > On Wed, Aug 10, 2016 at 12:52 PM, Christoph M. Becker > wrote: > The simplest way to fix ext/xml in particular is probably to migrate it to > use an object instead of a resource. > > Nikita If my memory strikes me right, then we did do this for ext/gmp too a while back for the operator overloading (I even think it was you that did that?). Maybe it would be time to evaluate the situation in 7.2, for extensions that still use resources[1] that could be affected by similar issues and adapt them hereafter. Looking at the code we also got this "special" resource, which is not exposed to the userland, called an "index pointer"[2], which only a few extensions are using (interbase, oci8, odbc & pgsql), is this a hack? [1] https://gist.github.com/KalleZ/df08b99efc7c7166cfa36aab2dbe8160 [2] https://gist.github.com/KalleZ/b5b8d47f3d523c9e806188c85aa10c68 -- regards, Kalle Sommer Nielsen kalle@php.net