Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35938 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84472 invoked from network); 4 Mar 2008 01:51:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2008 01:51:58 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.226 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 64.233.184.226 wr-out-0506.google.com Received: from [64.233.184.226] ([64.233.184.226:52405] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/F0-29055-E3BACC74 for ; Mon, 03 Mar 2008 20:51:58 -0500 Received: by wr-out-0506.google.com with SMTP id c48so197516wra.23 for ; Mon, 03 Mar 2008 17:51:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=vuwKwX/+imgCQIRYwcNW8Vl1NIhx7Lb8rUb7IyfdpPY=; b=T6nwIjFVBLe3P0MG6aa3QpQheXI9+0Af1fcH0XVEi8J7GR90etCb1h1U2iQOdY825qJg7d9mCOtm1UOmb2uQ7FAGKyrVfxYspr2FBJw/VKMM4ZF0m5hjuY4Ts4SKcVBGc6QyxeXEAglXvM94qKRkAEbzsXhMMraR2QQd87DirGc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Nt710LGKY33wYzMiXg37GTRIWF6VFiW8uxRIfUPOW1dOxLYE+YEa8iv6fYxVAOe4AMfqMMa6oW1GRth1f2+31IEXd0TX/RYgsi231XSOpDsPqmbPI7OuNmkiYYBBrIFnYPRNR6K0F1NjIEj2MkZth8Bv5zDcrNcCNzUz/SF+gDY= Received: by 10.100.231.16 with SMTP id d16mr797255anh.46.1204595514639; Mon, 03 Mar 2008 17:51:54 -0800 (PST) Received: from ?192.168.1.2? ( [189.24.126.3]) by mx.google.com with ESMTPS id n29sm1715057elf.5.2008.03.03.17.51.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Mar 2008 17:51:53 -0800 (PST) To: Arnold Daniels Cc: 'PHP Internals' In-Reply-To: <47CC968A.9060209@adaniels.nl> References: <47CC968A.9060209@adaniels.nl> Content-Type: text/plain; charset=utf-8 Date: Mon, 03 Mar 2008 22:51:22 -0300 Message-ID: <1204595482.5832.32.camel@pena> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Bug when throwing an Exception in a constructor From: felipensp@gmail.com (Felipe Pena) Hello. Index: Zend/zend_exceptions.c =================================================================== RCS file: /repository/ZendEngine2/zend_exceptions.c,v retrieving revision 1.79.2.6.2.9.2.4 diff -u -p -r1.79.2.6.2.9.2.4 zend_exceptions.c --- Zend/zend_exceptions.c 21 Jan 2008 19:39:55 -0000 1.79.2.6.2.9.2.4 +++ Zend/zend_exceptions.c 4 Mar 2008 01:47:35 -0000 @@ -734,6 +734,7 @@ ZEND_API void zend_throw_exception_objec zend_error(E_ERROR, "Exceptions must be valid objects derived from the Exception base class"); } zend_throw_exception_internal(exception TSRMLS_CC); + zend_clear_exception(TSRMLS_C); } /* }}} */ This looks good enough? Em Ter, 2008-03-04 às 01:23 +0100, Arnold Daniels escreveu: > Hi, > > I'm running into a bug when throwing an Exception in a constructor. I > sometimes get the message "Exception thrown without a stack frame in > Unknown on line 0" and sometimes a message like seen below. > > Unfortunately I'm not a create a simple example which causes the same > exception, so reporting a bug wouldn't be useful. The error is constant > within my current project though. This time I'm using reflection, but > that doesn't seem to have to much to do with it. I'm running 5.2.5 now, > but I had the same with 5.3. > > Does this sound familiar to anyone? > > Arnold > > ------------------------ > > > arnold@arnold-laptop:~/projects/php-projects/qdb/Demo$ php sshrpc.php > host: ssh.example.com > username: > password: > [Tue Mar 4 01:15:18 2008] Script: 'sshrpc.php' > --------------------------------------- > /usr/src/php5/php-5.2.5/Zend/zend_exceptions.c(406) : Block 0x089a1104 > status: > Beginning: OK (allocated on > /usr/src/php5/php-5.2.5/Zend/zend_exceptions.c:403, 78 bytes) > Start: OK > End: Overflown (magic=0x0000003A instead of 0xEAB4EE29) > 3 byte(s) overflown > --------------------------------------- > > Fatal error: Uncaught Q_Exception: Could not create SSH connection for > 'ssh.example.com': Server requires some form of authentication for user > 'arnold'. in > ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ on line 146 > #0 > ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ)���ZO�5$Y(146): > Q_RPCClient_SSH->makeConnection('ssh.example.com', Array) > #1 [internal function]: Q_RPCClient_SSH->__construct(Array) > #2 /home/arnold/projects/php-projects/qdb/src/Q/RPCClient.php(93): > ReflectionClass->newInstanceArgs(Array) > #3 [internal function]: Q_RPCClient::connect('ssh', Array) > #4 /home/arnold/projects/php-projects/qdb/src/Q/RPCClient.php(110): > call_user_func_array(Array, Array) > #5 /home/arnold/projects/php-projects/qdb/Demo/sshrpc.php(8): > Q_RPCClient::remote('ssh', Array) > #6 {main} > thrown in /home/arnold/projects/php-projects/qdb/src/Q/RPCClient/SSH.php > on line 200 > > Warning: String is not zero-terminated > (ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ)���ZO�5) > (source: /usr/src/php5/php-5.2.5/Zend/zend_variables.h:35) in Unknown on > line 0 > [Tue Mar 4 01:15:18 2008] Script: 'sshrpc.php' > --------------------------------------- > /usr/src/php5/php-5.2.5/Zend/zend_variables.h(35) : Block 0x089a6e4c status: > /usr/src/php5/php-5.2.5/Zend/zend_variables.c(36) : Actual location > (location was relayed) > Beginning: Cached > Freed (invalid) > Start: OK > End: OK > --------------------------------------- > > arnold@arnold-laptop:~/projects/php-projects/qdb/Demo$ php -v > PHP 5.2.5 (cli) (built: Mar 3 2008 22:20:58) (DEBUG) > Copyright (c) 1997-2007 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies > > -- Regards, Felipe Pena.