Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73835 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24224 invoked from network); 28 Apr 2014 20:35:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2014 20:35:45 -0000 Authentication-Results: pb1.pair.com header.from=php@thekid.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@thekid.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thekid.de from 212.227.17.13 cause and error) X-PHP-List-Original-Sender: php@thekid.de X-Host-Fingerprint: 212.227.17.13 mout.kundenserver.de Received: from [212.227.17.13] ([212.227.17.13:50460] helo=mout.kundenserver.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/F0-19537-0ABBE535 for ; Mon, 28 Apr 2014 16:35:45 -0400 Received: from oxbsltgw15.schlund.de (oxbsltgw15.schlund.de [172.19.249.32]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0MOzJP-1WZ5FD3pcl-006S1F; Mon, 28 Apr 2014 22:35:40 +0200 Date: Mon, 28 Apr 2014 22:35:40 +0200 (CEST) Reply-To: Timm Friebe To: =?UTF-8?Q?=22Johannes_Schl=C3=BCter=22?= Cc: internals@lists.php.net Message-ID: <811192582.486350.1398717340893.open-xchange@email.1und1.de> In-Reply-To: <1398676031.26923.36.camel@guybrush> References: <1005082480.406481.1398600039315.open-xchange@email.1und1.de> <1398676031.26923.36.camel@guybrush> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.4.2-Rev18 X-Provags-ID: V02:K0:VqBotWuMgoQmX8iCHHfoO5VWHtMpkHitvYvqAELem8M yix/3hSpOw5soyWLmNDHLfixvA/JVEOk4ETlIfmdvF5IwE//IO 1h4WeOqMhYcjdtxStArLnxc8OQoQDIOFRhXtRrj3GnsTedQ5gV gACqyj54ORq0w4q11de+uvFgspbqkBKaefGWNiQ0wnfNGyn7Qp HWMp2VSd+11jOl3Gl/196N4PJNIuUYnJprNruhbxjdmWOBQryT gZ5RvMBhe06cBvYpzaHjH7zPI1rxVHkfoYDDXVkfoKsJAQTZqD ZfCNe2EWwvArINT6eYJ4x1QLtV6JViS/6qsZyip1IYIU39hz6v +chut9yqRUKzF6O4ODM0pJD7S2ASWbJnPWWSo+gWxviPOteMyH Ac0fVxqea2yM8WVM62+KYOyi+sj/K07fq4= Subject: Re: [PHP-DEV] RFC: Catchable "call to a member function of a non-object" From: php@thekid.de (Timm Friebe) Hi Johannes, =C2=A0 > The definition of E_ERROR is "an error where the engine can't fully > recover", so if we can recover there should be no need for a vote ;-) =C2=A0 :) > But I have doubts whether this works reliably in all cases where > functions are called. i.e. how will usort() behave? =C2=A0 You're right, there's not test for this. I've added two phpt-files showing this does not corrupt eval() or calls inside usort(): =C2=A0 https://github.com/thekid/php-src/commit/da1db5e688c46a044bc0745c86cc34cc4e= 9ab808 https://github.com/thekid/php-src/commit/7041ef44a6c18bb8d76dc5cf17d20ec003= 67d24b > From a very quick grep it seems that i.e. sapi/phpdbg doesn't check the > return value of zend_call_function, these things have to be reviewed too. Good point! Looking into the details of my implementation again though, this cannot lead to a problem AFAIS, zend_call_function() will return cleanly in any case. I'm not firm with sapi/phpdbg's usage, could you point to where you think I'd start seeing a problem? What I've tried so far is: $ cat dbg.php compare(1, 2)); echo "Alive\n"; $ ./sapi/phpdbg/phpdbg [Welcome to phpdbg, the interactive PHP debugger, v0.3.2] To get help using phpdbg type "help" and press enter [Please report bugs to ] phpdbg> exec dbg.php [Set execution context: /home/friebe/devel/php-src/dbg.php] phpdbg> compile [Attempting compilation of /home/friebe/devel/php-src/dbg.php] [Success] phpdbg> run int(4096) string(51) "Call to a member function compare() on a non-object" NULL Alive phpdbg> ...and also "step 1" and the "next"ing through the code, without any surpri= ses. - Timm