Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34679 invoked from network); 17 Feb 2009 20:59:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2009 20:59:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.134 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.134 mailout2.netbeat.de Linux 2.6 Received: from [83.243.58.134] ([83.243.58.134:55280] helo=mailout2.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/09-36931-B152B994 for ; Tue, 17 Feb 2009 15:59:08 -0500 Received: (qmail 23589 invoked by uid 89); 17 Feb 2009 21:19:46 -0000 Received: from unknown (HELO ?192.168.1.103?) (johannes%schlueters.de@93.104.35.87) by mailout2.netbeat.de with ESMTPA; 17 Feb 2009 21:19:46 -0000 To: Dmitry Stogov , PHP Internals Content-Type: multipart/mixed; boundary="=-Dlq/isfPni0ut4DmCLJk" Date: Tue, 17 Feb 2009 21:59:03 +0100 Message-ID: <1234904343.17605.35.camel@goldfinger> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Subject: ZEND_USER_OPCODE_CONTINUE From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) --=-Dlq/isfPni0ut4DmCLJk Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, while implementing a small toy extension (see [1]) I found out that ZEND_USER_OPCODE_CONTINUE seems to misbehave as it doesn't go to the next opcode so I ended up in an endless loop executing the same opcode again and again. I'm not sure whether we should change the behavior, using a trivial patch like the attached one or whether we should add a ZEND_USER_OPCODE_NEXT_OPCODE constant. The first approach looks nicer to me but might break extensions working around that problem in a hard to track way (skipping an opcode) Ideas, comments? johannes [1] http://news.php.net/php.pecl.dev/6117 --=-Dlq/isfPni0ut4DmCLJk Content-Disposition: attachment; filename="zend_user_opcode_continue01.diff" Content-Type: text/x-patch; name="zend_user_opcode_continue01.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: Zend/zend_vm_def.h =================================================================== RCS file: /repository/ZendEngine2/zend_vm_def.h,v retrieving revision 1.59.2.29.2.48.2.84 diff -u -p -r1.59.2.29.2.48.2.84 zend_vm_def.h --- Zend/zend_vm_def.h 26 Jan 2009 22:54:20 -0000 1.59.2.29.2.48.2.84 +++ Zend/zend_vm_def.h 17 Feb 2009 20:55:32 -0000 @@ -4338,7 +4338,7 @@ ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, A switch (ret) { case ZEND_USER_OPCODE_CONTINUE: - ZEND_VM_CONTINUE(); + ZEND_VM_NEXT_OPCODE(); case ZEND_USER_OPCODE_RETURN: ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper); case ZEND_USER_OPCODE_DISPATCH: --=-Dlq/isfPni0ut4DmCLJk--