Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c

From: Date: Sun, 03 Aug 2003 13:06:52 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
References: 1 2 3 4 5 6 7 8 9  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1584@lists.php.net to get a copy of this message
At 14:00 03/08/2003, Marcus Börger wrote:
Hello Marcus, Sunday, August 3, 2003, 12:53:06 PM, you wrote: MB> Hello Zeev, MB> Sunday, August 3, 2003, 12:34:03 PM, you wrote: MB> blablabla ZS>> In practice, what your patches do is look at the .opcodes pointer without ZS>> first verifying that they're dealing with a userland function. That's a ZS>> bug. MB> damn, you're right. And wow now i changed it and removed the initialization it crashes. So somehow the struct i need to deal with is not completely initialized when i use it. if (fptr->type == ZEND_USER_FUNCTION) {
    zend_op *op;
    op = fptr->op_array.opcodes;
    while (op) {
     ....
Is there something more i can do to verify that opcodes is valid?
opcodes is always supposed to be valid (either NULL or containing a valid pointer) - sounds very odd... Anyway, as Andi mentioned I've been working on infrastructure for argument info recently, so it won't be necessary to look into the opcodes for that sort of stuff very soon :) Zeev

« previous php.zend-engine.cvs (#1584) next »