Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67892 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67612 invoked from network); 26 Jun 2013 16:21:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2013 16:21:42 -0000 Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:42769] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/28-29746-5151BC15 for ; Wed, 26 Jun 2013 12:21:41 -0400 Received: from Hwhost2.local (55-76.79-83.cust.bluewin.ch [83.79.76.55]) by host1.trois-doubles.net (Postfix) with ESMTPSA id 1BDF22008CA for ; Wed, 26 Jun 2013 18:21:38 +0200 (CEST) Message-ID: <51CB1511.9050109@hoa-project.net> Date: Wed, 26 Jun 2013 18:21:37 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Thunderbird/23.0a2 MIME-Version: 1.0 To: internals@lists.php.net References: <51CB114C.5020606@hoa-project.net> <1372263564.2410.25.camel@guybrush> In-Reply-To: <1372263564.2410.25.camel@guybrush> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] UNKNOW:0, what is it? From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 26/06/13 18:19, Johannes Schl=C3=BCter wrote: > On Wed, 2013-06-26 at 18:05 +0200, Ivan Enderlin @ Hoa wrote: >> Hello, >> >> Again, I have a segfault with RecursiveDirectoryIterator when I extend= >> it. This time, I have a very strange value on my SplFileInfo extension= >> (subclass). When I var_dump the value, I have UNKNOWN:0. This is not a= >> string, not null, not false, just UNKNOW:0, without type. Any idea of >> what is it? >> >> Thanks :-). > Unknown is an unknown value in a structure when a zval is not properly > set. Most likely you didn't call the parent's constructor. To bad, the constructor has been called :-(. The error is here:=20 https://github.com/hoaproject/Iterator/blob/master/Recursive/Directory.ph= p#L125.=20 This is a line that causes the segfault. And at line 109,=20 $this->getRelativePath() returns UNKNOWN:0. But if I var_dump=20 $this->_relativePath directly (without using the method), I have a real=20 value. I can't explain this. --=20 Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/