Re: Re: cvs: php4(PHP_4_3) / TODO_SEGFAULTS /ext/exif exif.c
| From: | Andi Gutmans | Date: | Sat, 05 Apr 2003 12:29:35 +0000 |
| Subject: | Re: Re: cvs: php4(PHP_4_3) / TODO_SEGFAULTS /ext/exif exif.c | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-716@lists.php.net to get a copy of this message | ||
At 10:36 PM 4/2/2003 -0800, Rasmus Lerdorf wrote:
On Wed, 2 Apr 2003, Andi Gutmans wrote: I'm not completely sure but from first glance at exif it is *completely* broken everywhere. You're not supposed to use zval_dtor() on parameters you get via zend_get_parameters_ex(). They are read-only as they are reference counted and are possibly pointed to by other variables too. You should use zend_get_parameters() if you want to be able to change them (such as calling zval_dtor()). Looking around a bit, parse_str(), getimagesize() and preg_match() all do: zend_get_parameters_ex(1, arg) zval_dtor(arg); array_init(arg); These are broken too then?Most probably. When you retrieve arguments with zend_get_parameters_ext() you are basically asking to receive it as read-only. You are allowed to use convert_to_type_ex() but you're not supposed to use functions which change the parameter directly such as convert_to_string(), zval_dtor() and so on. Andi