Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39965 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10932 invoked from network); 14 Aug 2008 19:19:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2008 19:19:02 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:40745] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/7C-45372-52584A84 for ; Thu, 14 Aug 2008 15:19:01 -0400 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id D357E11F0C3; Thu, 14 Aug 2008 21:18:58 +0200 (CEST) Date: Thu, 14 Aug 2008 21:18:55 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <911733834.20080814211855@marcus-boerger.de> To: Lupus Michaelis CC: internals@lists.php.net In-Reply-To: <201245907.20080814211734@marcus-boerger.de> References: <6D.DA.45372.54C74A84@pb1.pair.com> <201245907.20080814211734@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Exception segfault From: helly@php.net (Marcus Boerger) Hello Marcus, Thursday, August 14, 2008, 9:17:34 PM, you wrote: > Hello Lupus, > Thursday, August 14, 2008, 8:42:23 PM, you wrote: >> Hi, >> At first time, it was a bug in the useful xdebug, and I follow it to >> the PHP code . >> When exception::$message, exception::$line are not of the initial >> type, it segfaults (for strings) or display non-predictible data. The >> next snipset for test : >> > class my_file >> { >> public function __toString() >> { >> return "somebuildfilename" ; >> } >> } >> class my_exception extends exception >> { >> public function __construct() >> { >> $this->message = new stdclass ; >> $this->file = new my_file ; >> $this->line = "12" ; >> } >> } >> throw new my_exception ; ?>>> >> I attach a patch that correct the segfault. Diff was produced with >> this line : diff php5.3-200808141030{,-lupus}/Zend/zend_exceptions.c > Thanks for letting us know. Can you provide the diff using 'cvs di -uwp'. Well, Felipe was much faster than I. He applied your patch already. Thanks again a lot. Best regards, Marcus