Re: [PHP4BETA] cvs: /php4/ext/sybase_ct php_sybase_ct.c /php4/ext/sybase sybase.c
| From: | Thies C. Arntzen | Date: | Sat, 15 Jan 2000 16:38:22 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4/ext/sybase_ct php_sybase_ct.c /php4/ext/sybase sybase.c | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9147@lists.php.net to get a copy of this message | ||
when a list-destructor is called from within destroy_resource_list() we
are *not* allowed to change anything in regular_list!
if we move (like i suggested) the destruction of symbol_table before
destroy_resource_list() we should be ok with it. 'cause the
list-destructor will no longer be called via hash_destroy(regular_list)
and thereby it would be ok to hash_apply(regular_list).
the perfect case would be if we don't need to hash_apply to resource_list
*at all*!
tc
On Sat, 15 Jan 2000, Zeev Suraski wrote:
> What's the meaning of this? Is it due to the change?
>
>
>
> On Sat, 15 Jan 2000, Thies C. Arntzen wrote:
>
> > thies Sat Jan 15 05:39:16 2000 EDT
> >
> > Modified files:
> > /php4/ext/sybase_ct php_sybase_ct.c
> > /php4/ext/sybase sybase.c
> > Log:
> > just add a remark. zend_hash_apply can & will cause problems here unless
> >
> >
> > Index: php4/ext/sybase_ct/php_sybase_ct.c
> > diff -u php4/ext/sybase_ct/php_sybase_ct.c:1.13 php4/ext/sybase_ct/php_sybase_ct.c:1.14
> > --- php4/ext/sybase_ct/php_sybase_ct.c:1.13 Fri Dec 31 17:31:54 1999
> > +++ php4/ext/sybase_ct/php_sybase_ct.c Sat Jan 15 05:39:15 2000
> > @@ -17,7 +17,7 @@
> > +----------------------------------------------------------------------+
> > */
> >
> > -/* $Id: php_sybase_ct.c,v 1.13 2000/01/01 01:31:54 sas Exp $ */
> > +/* $Id: php_sybase_ct.c,v 1.14 2000/01/15 13:39:15 thies Exp $ */
> >
> >
> > #include "php.h"
> > @@ -127,6 +127,12 @@
> > CS_INT con_status;
> >
> > sybase_ptr->valid = 0;
> > +
> > + /*
> > + this can cause crashes in the current model.
> > + if the resource gets destroyed via destroy_resource_list() resource_list
> > + will *not* be in a consistent state. thies@digicol.de
> > + */
> > zend_hash_apply(resource_list,(int (*)(void *))_clean_invalid_results);
> >
> > /* Non-persistent connections will always be connected or we wouldn't
> > Index: php4/ext/sybase/sybase.c
> > diff -u php4/ext/sybase/sybase.c:1.20 php4/ext/sybase/sybase.c:1.21
> > --- php4/ext/sybase/sybase.c:1.20 Fri Dec 31 17:31:53 1999
> > +++ php4/ext/sybase/sybase.c Sat Jan 15 05:39:15 2000
> > @@ -20,7 +20,7 @@
> > +----------------------------------------------------------------------+
> > */
> >
> > -/* $Id: sybase.c,v 1.20 2000/01/01 01:31:53 sas Exp $ */
> > +/* $Id: sybase.c,v 1.21 2000/01/15 13:39:15 thies Exp $ */
> >
> >
> > #include "php.h"
> > @@ -160,6 +160,13 @@
> > static void _close_sybase_link(sybase_link *sybase_ptr)
> > {
> > sybase_ptr->valid = 0;
> > +
> > + /*
> > + this can cause crashes in the current model.
> > + if the resource gets destroyed via destroy_resource_list() resource_list
> > + will *not* be in a consistent state. thies@digicol.de
> > + */
> > +
> > zend_hash_apply(resource_list,(int (*)(void *))_clean_invalid_results);
> > dbclose(sybase_ptr->link);
> > dbloginfree(sybase_ptr->login);
> >
> >
> >
> >
>
> --
> Zeev Suraski <zeev@zend.com>
> http://www.zend.com/
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany