Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39963 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4797 invoked from network); 14 Aug 2008 18:45:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2008 18:45:37 -0000 Received: from [127.0.0.1] ([127.0.0.1:14069]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 5C/6B-45372-15D74A84 for ; Thu, 14 Aug 2008 14:45:37 -0400 X-Host-Fingerprint: 62.147.235.43 maison.lupusmic.org Received: from [62.147.235.43] ([62.147.235.43:24916] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/DA-45372-54C74A84 for ; Thu, 14 Aug 2008 14:41:09 -0400 Message-ID: <6D.DA.45372.54C74A84@pb1.pair.com> To: internals@lists.php.net Date: Thu, 14 Aug 2008 20:42:23 +0200 User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050605010902080401010109" X-Posted-By: 62.147.235.43 Subject: Exception segfault From: mickael+php@lupusmic.org (Lupus Michaelis) --------------050605010902080401010109 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 : 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 Regards, Mickaël. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org --------------050605010902080401010109 Content-Type: text/x-patch; name="correct_exception.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="correct_exception.patch" 767a768,770 > > convert_to_string(file) ; > convert_to_long(line) ; 778a782,785 > convert_to_string(str) ; > convert_to_string(file) ; > convert_to_long(line) ; > --------------050605010902080401010109--