Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68344 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16219 invoked from network); 31 Jul 2013 09:25:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2013 09:25:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=julien.salleyron@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julien.salleyron@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.53 as permitted sender) X-PHP-List-Original-Sender: julien.salleyron@gmail.com X-Host-Fingerprint: 209.85.220.53 mail-pa0-f53.google.com Received: from [209.85.220.53] ([209.85.220.53:47861] helo=mail-pa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/21-07795-AF7D8F15 for ; Wed, 31 Jul 2013 05:25:15 -0400 Received: by mail-pa0-f53.google.com with SMTP id lb1so645722pab.26 for ; Wed, 31 Jul 2013 02:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=HwNz0vSfWlM+VsUDPYTE2JIWSqAHcW9CGKtvrhRx2sY=; b=U+794gKBKQC7pgbZsDqB/cD/+FXTLAFB2LMb/tsBZKe9nwbX1QtCrf0A1KBPxomxwU AbfAGuzogsWQITZlf0XJ4RgFp/T16f3c0h8MyWY5O1qF3ZEpU9Tvtd6LVlz6EVgHn6MZ CFecm5Xm4DU2x6TB5Ezgp799XwIV9RMVwgkQskBXuhH3y5kc7JgeYeO2Uq6QvPfkyX+C hxz/e03F1SCOgiVJGQEy7MqiS/uwKEcdhAWabJ7KcgHQgdjqj9YVgBLEp1F0BXQDUrL/ 1oS+p0hc/qH6nJIz5Teo8pY9+Y6u6f0waXVURh7E7EsLYy7JcVP2whWSQNnvCjleA+oY bZJw== X-Received: by 10.68.5.228 with SMTP id v4mr5967267pbv.117.1375262711568; Wed, 31 Jul 2013 02:25:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.129.9 with HTTP; Wed, 31 Jul 2013 02:24:51 -0700 (PDT) Date: Wed, 31 Jul 2013 11:24:51 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=bcaec52154df6561f504e2cb4d12 Subject: zend_execute_ex problem From: julien.salleyron@gmail.com (Julien SALLEYRON) --bcaec52154df6561f504e2cb4d12 Content-Type: text/plain; charset=UTF-8 Hi, I'm working on the AOP_PHP extension (http://pecl.php.net/package/AOP dedicated to bring the AOP paradigm to PHP (may it be evil or not)) and I'm struggling to make it compatible with PHP 5.5 As you probably expect, as the AOP paradigm is something like a magical hook, I have to overload the zend_execute function (and zend_execute_ex in PHP 5.5). Sometimes, I want to call the hooks before the execution of the actual called method. If an exception is raised in the hook, I won't always call the former called method. This was working like a charm in PHP 5.4.X (zend_execute) and before, but in PHP 5.5(zend_execute_ex) I have troubles with memory management. First, it seems that if I don't replace the EG(execute_data) by EG(execute_data)->prev_execute_data, I end in a infinite loop. If I EG(execute_data) = EG(execute_data)->prev_execute_data, there is no loop anymore, but I have freeing error (apparently in zend_clear_multiple_stack). I've tried to zend_stack_push(0) in order to *not* free any arguments in the stack (as I don't have any), but trying this, I still have another freeing error in the handle of the exception because there is a loop (and freeing) until we can get the zend_vm_stack_frame_base(). Am I doing wrong ? Any pointers ? Is there something simplier to just ignore the real execution without having memory problem ? Thanks for your time and help. --bcaec52154df6561f504e2cb4d12--