Fix for 30818, 28839, 32229, 30513

php.internals

Kamesh Jayachandran

21 years ago
Hi, In case of interactive mode the for ZEND_JMP op1.u.jmp_addr is not evaluated, it still has the relative diff from the current opcode. for ZEND_JMP, ZEND_JMPNZ, ZEND_JMPZ_EX, ZEND_JMPNZ_EX op2.u.jmp_addr is not evaluated, it still has the relative diff from the current opcode. This normally happens from pass_two. I am attaching the patch which does this jmp_addr evaluation. This patch is against php-5.0.4-dev-RC[2]. http://puggy.symonds.net/~kameshj/zend_execute_API.c.patch Can someone apply this patch? With regards Kamesh Jayachandran

Derick Rethans

21 years ago
On Fri, 18 Mar 2005, Kamesh Jayachandran wrote:
> Hi, > In case of interactive mode the > for ZEND_JMP > op1.u.jmp_addr is not evaluated, it still has the relative diff from the > current opcode. > > for ZEND_JMP, ZEND_JMPNZ, ZEND_JMPZ_EX, ZEND_JMPNZ_EX > op2.u.jmp_addr is not evaluated, it still has the relative diff from the > current opcode. > > This normally happens from pass_two. > I am attaching the patch which does this jmp_addr evaluation. This patch > is against php-5.0.4-dev-RC[2]. > > http://puggy.symonds.net/~kameshj/zend_execute_API.c.patch > > Can someone apply this patch?
Would this also be applicable to 4.3? Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

val khokhlov

21 years ago
Hello Kamesh, Friday, March 18, 2005, 12:46:44 PM, you wrote: KJ> This normally happens from pass_two. KJ> I am attaching the patch which does this jmp_addr evaluation. This patch KJ> is against php-5.0.4-dev-RC[2]. your code will duplicate some lines pass_two(), won't it? or execute_new_code() is called only in very special cases, when pass_two() might not be called?
-- Best regards, val mailto:val@vk.kiev.ua

Kamesh Jayachandran

21 years ago
Hi Val, Yes I got this fix from pass_two only. It duplicates pass_two especially the while loop. With regards Kamesh Jayachandran On Fri, 18 Mar 2005 13:05:46 +0200, "val khokhlov" <val@vk.kiev.ua> said:

val khokhlov

21 years ago
Hello Kamesh, Friday, March 18, 2005, 1:15:53 PM, you wrote: KJ> Yes I got this fix from pass_two only. It duplicates pass_two especially KJ> the while loop. you see, i also use this part of pass_two() code in my ext. maybe, it'd be a good idea to find one place for this jump addr calculation, so it won't be duplicated? (although, it's likely a question to zend developers)
-- Best regards, val mailto:val@vk.kiev.ua

Andi Gutmans

21 years ago
Yeah it might make sense to move that to a function. But for some reason I already see that zend_execute_API.c contains this code in HEAD. Did someone apply and I missed the commit msg? Kamesh, can you please verify if it exists in your source tree? Good catch btw. Andi At 01:46 PM 3/18/2005 +0200, val khokhlov wrote:

Kamesh Jayachandran

21 years ago
Hi Andi, I could not see this change in CVS both in 5_0_4-dev tree and HEAD. Can someone apply my patch? With regards Kamesh Jayachandran On Fri, 18 Mar 2005 13:56:25 -0800, "Andi Gutmans" <andi@zend.com> said:

Jani Taskinen

21 years ago
On Sun, 20 Mar 2005, Kamesh Jayachandran wrote:
> Hi Andi, > I could not see this change in CVS both in 5_0_4-dev tree and HEAD. > > Can someone apply my patch?
Done. --Jani

Kamesh Jayachandran

21 years ago
Hi Jani, Thanks for commiting the patch. But I feel you can do the same on PHP-5.0.4-dev tree also. With regards Kamesh Jayachandran On Sat, 26 Mar 2005 04:45:58 +0200 (EET), "Jani Taskinen" <sniper@iki.fi> said:

Jani Taskinen

21 years ago
I'll commit the patch to PHP_5_0 branch after 5.0.4 is released. This is not a showstopper. --Jani On Mon, 28 Mar 2005, Kamesh Jayachandran wrote: