Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73551 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27218 invoked from network); 3 Apr 2014 07:30:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2014 07:30:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=kajetan@jesej.si; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kajetan@jesej.si; sender-id=pass Received-SPF: pass (pb1.pair.com: domain jesej.si designates 84.255.236.41 as permitted sender) X-PHP-List-Original-Sender: kajetan@jesej.si X-Host-Fingerprint: 84.255.236.41 mail.jesej.si Received: from [84.255.236.41] ([84.255.236.41:34387] helo=mail.jesej.si) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/D1-15417-D0E0D335 for ; Thu, 03 Apr 2014 02:30:22 -0500 Received: from mail.jesej.si (localhost [127.0.0.1]) by mail.jesej.si (Postfix) with ESMTPA id 73F9F760C1F for ; Thu, 3 Apr 2014 09:29:20 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 Apr 2014 09:29:20 +0200 To: Internals In-Reply-To: References: <48f9daf10cfb599cba809b100ef51e9c@jesej.si> Message-ID: X-Sender: kajetan@jesej.si User-Agent: Roundcube Webmail/RCMAIL_VERSION Subject: Re: Re: [PHP-DEV] Fwd: =?UTF-8?Q?zend=5Fstd=5Fget=5Fmethod=20=3A?= =?UTF-8?Q?=20Address=20=30xffffffff=20is=20not=20stack=27d=2C=20malloc=27?= =?UTF-8?Q?d=20or=20=28recently=29=20free=27d?= From: kajetan@jesej.si (Kajetan Dolinar) > Hi, > > fixed: https://gist.github.com/bukka/9936176 [3] > > The main problem was that you are trying to save return_value to static > variable and then re-use it ( > https://github.com/kdolinar/hypx-zend-bugcase/blob/master/src/hypx.c#L302 [4] ) > > That won't work because of GC (value can be freed in the meantime). > There were also some memory leaks and missing TSRMLS that I fixed. > Compare the the gist file and you will see that. I fixed just this case > so the index.php works. However there might be more similar case that > you need to check... > > Jakub Thanks, Jakub, very much for your insight. Yes, obviously saving a return_value into a static property was a bad idea. But how can I then create a persistent object and assign it to a static property? Here I'm after a typical singleton class where the only instance of the object is kept in a private static property. Kajetan