# Fix for 30818, 28839, 32229, 30513

- Thread: https://externals.io/message/15483
- Original archive: https://news-web.php.net/php.internals/15483
- Started by Kamesh Jayachandran on 2005-03-18T10:46:44+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15483 — Kamesh Jayachandran — 2005-03-18T10:46:44+00:00

URL: https://externals.io/message/15483#15483

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

---

## #15484 — Derick Rethans — 2005-03-18T10:55:36+00:00

URL: https://externals.io/message/15483#15484 · In reply to: #15483

> 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

---

## #15485 — val khokhlov — 2005-03-18T11:05:46+00:00

URL: https://externals.io/message/15483#15485 · In reply to: #15483

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

---

## #15486 — Kamesh Jayachandran — 2005-03-18T11:15:53+00:00

URL: https://externals.io/message/15483#15486 · In reply to: #15485

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:
> 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

---

## #15487 — val khokhlov — 2005-03-18T11:46:46+00:00

URL: https://externals.io/message/15483#15487 · In reply to: #15486

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
