Re: Exception segfault
| From: | Marcus Boerger | Date: | Thu, 14 Aug 2008 19:18:55 +0000 |
| Subject: | Re: Exception segfault | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39965@lists.php.net to get a copy of this message | ||
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
>> <http://bugs.xdebug.org/bug_view_page.php?bug_id=0000340>.
>> 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 :
>> <?php
>> 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