# Zend Engine question

- Thread: https://externals.io/message/5062
- Original archive: https://news-web.php.net/php.internals/5062
- Started by Wojtek Meler on 2003-10-29T14:35:46+00:00
- Messages: 3
- 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

---

## #5062 — Wojtek Meler — 2003-10-29T14:35:46+00:00

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

Are there any tools for debugging ZE? I've got a problem with huge script that 
at some point behave like all variables were reference to single variable.
I suspect that there is something wrong with EG(uninitialized_zval).
Any hints how to fight it?
I've compiled it with ZEND_INTENSIVE_DEBUGGING and it found nothing. When I 
debug it with simple debugger I can see that all ZEND_FETCH_W opcodes receives 
the same zval address and ZEND_ASSIGN doesn't change it. I don't know how it 
should work yet, but I'll learn it soon. Maybe someone could give me a piece of 
advice?

Regards,
Wojtek

---

## #5063 — Moriyoshi Koizumi — 2003-10-29T14:55:17+00:00

URL: https://externals.io/message/5062#5063 · In reply to: #5062

Hi,

First, maybe you want to see bug #22836 (http://bugs.php.net/22836), that appears to describe the very problem you have.

Secondly, you can use various custom gdb macros like printzv, printzn 
which are defined in .gdbinit on top of the php source tree.

Moriyoshi

Wojtek Meler <wmeler@wp-sa.pl> wrote:

> Are there any tools for debugging ZE? I've got a problem with huge script that 
> at some point behave like all variables were reference to single variable.
> I suspect that there is something wrong with EG(uninitialized_zval).
> Any hints how to fight it?
> I've compiled it with ZEND_INTENSIVE_DEBUGGING and it found nothing. When I 
> debug it with simple debugger I can see that all ZEND_FETCH_W opcodes receives 
> the same zval address and ZEND_ASSIGN doesn't change it. I don't know how it 
> should work yet, but I'll learn it soon. Maybe someone could give me a piece of 
> advice?
> 
> Regards,
> Wojtek

---

## #5064 — Wojtek Meler — 2003-10-29T15:11:19+00:00

URL: https://externals.io/message/5062#5064 · In reply to: #5063

Moriyoshi Koizumi wrote:

>Hi,
>
>First, maybe you want to see bug #22836 (http://bugs.php.net/22836), that appears to describe the very problem you have.
>
Probably yes. I assume that it won't be fixed in ZE1, will it?
Is there any way to fix it for own risk? I saw something in 
zend_execute.c with comment "too dengerous for ZE1"

>Secondly, you can use various custom gdb macros like printzv, printzn 
>which are defined in .gdbinit on top of the php source tree.
>  
>
Cool!!!  I used my own gdb script, but this one is great.

regards,
Wojtek
