Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_sdl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_sdl.c trunk/ext/soap/php_sdl.c
On Mon, Mar 5, 2012 at 13:59, Dmitry Stogov dmi...@php.net wrote: dmitry Mon, 05 Mar 2012 12:59:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323909 Log: Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header) Bug: https://bugs.php.net/60887 (Assigned) SoapClient ignores user_agent option and sends no User-Agent header Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c U php/php-src/trunk/ext/soap/php_sdl.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:59:01 UTC (rev 323909) @@ -41,7 +41,11 @@ - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) - + +- SOAP + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no + User-Agent header). (carloschilazo at gmail dot com) + - SQLite3 extension: . Add createCollation() method. (Brad Dewar) Modified: php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c === --- php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909) @@ -3259,6 +3259,13 @@ context = php_stream_context_alloc(); } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), _user_agent, sizeof(_user_agent), (void **) tmp) == SUCCESS + Z_TYPE_PP(tmp) == IS_STRING Z_STRLEN_PP(tmp) 0) { + smart_str_appends(headers, User-Agent: ); + smart_str_appends(headers, Z_STRVAL_PP(tmp)); + smart_str_appends(headers, \r\n); + } Shouldn't it fallback on the ini option? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st
The operation can continue on-successfully so E_NOTICE seemed appropriate, I don't see a problem with escalating this to E_WARNING. On Sat, Mar 3, 2012 at 9:34 PM, Laruence larue...@php.net wrote: Hi: is a WARNING better? :) thanks On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky il...@php.net wrote: iliaa Sat, 03 Mar 2012 20:36:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323852 Log: Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix socket path = 'Unknown error' Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt U php/php-src/trunk/main/streams/xp_socket.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st
Hi: is a WARNING better? :) thanks On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky il...@php.net wrote: iliaa Sat, 03 Mar 2012 20:36:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323852 Log: Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix socket path = 'Unknown error' Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt U php/php-src/trunk/main/streams/xp_socket.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce-cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.net wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; *pl = Z_STRLEN_PP(arg); *p = Z_STRVAL_PP(arg); return SUCCESS; } + zval_ptr_dtor(obj); }
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) thanks change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce-cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.net wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg,
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 4:31 PM, Laruence larue...@php.net wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) what I mean temporary is, apply this fix to 5.3 and 5.4 then do the right fix which you said to 5.4.1 :) thanks thanks change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce-cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.net wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On 02/27/2012 12:37 PM, Laruence wrote: On Mon, Feb 27, 2012 at 4:31 PM, Laruencelarue...@php.net wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogovdmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) what I mean temporary is, apply this fix to 5.3 and 5.4 then do the right fix which you said to 5.4.1 :) we won't be able to change API in 5.4.1, so it's for 5.5. Thanks. Dmitry. thanks thanks change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce-cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huilarue...@php.netwrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, 27 Feb 2012, Laruence wrote: On Mon, Feb 27, 2012 at 4:31 PM, Laruence larue...@php.net wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) what I mean temporary is, apply this fix to 5.3 and 5.4 then do the right fix which you said to 5.4.1 :) You can't break extension APIs between 5.4.0 and 5.4.1 either, API changes can only into trunk. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 11:17 AM, Derick Rethans der...@php.net wrote: You can't break extension APIs between 5.4.0 and 5.4.1 either, API changes can only into trunk. And ABI neither. -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to it? Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch c...@l-i-e.com wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Sent from my iPad 在 2012-2-28,0:10,Anthony Ferrara ircmax...@gmail.com 写道: Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to plz look at the final fix: r323563 thanks r323563 Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch c...@l-i-e.com wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
I initially looked at the final fix when I discovered the issue. Follow me out on this. This is the current code as-implemented in r323563: 265 zval *obj; 266 MAKE_STD_ZVAL(obj); 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { 268 zval_ptr_dtor(arg); 269 *arg = obj; 270 *pl = Z_STRLEN_PP(arg); 271 *p = Z_STRVAL_PP(arg); 272 return SUCCESS; 273 } 274 efree(obj); The issue that I originally identified (overwriting the argument pointer) is still happening. Is there any reason for overwriting the arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well (instead of efree, as that way if a reference is stored somewhere it won't result in a double free, or a segfault for accessing freed memory)? Thanks, Anthony On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui larue...@gmail.com wrote: Sent from my iPad 在 2012-2-28,0:10,Anthony Ferrara ircmax...@gmail.com 写道: Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to plz look at the final fix: r323563 thanks r323563 Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch c...@l-i-e.com wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Tue, Feb 28, 2012 at 1:10 AM, Anthony Ferrara ircmax...@gmail.com wrote: I initially looked at the final fix when I discovered the issue. Follow me out on this. This is the current code as-implemented in r323563: 265 zval *obj; 266 MAKE_STD_ZVAL(obj); 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { 268 zval_ptr_dtor(arg); 269 *arg = obj; 270 *pl = Z_STRLEN_PP(arg); 271 *p = Z_STRVAL_PP(arg); 272 return SUCCESS; 273 } 274 efree(obj); The issue that I originally identified (overwriting the argument pointer) is still happening. Is there any reason for overwriting the arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well Oops, you are right.. thanks for pointing this out. :) (instead of efree, as that way if a reference is stored somewhere it won't result in a double free, or a segfault for accessing freed memory)? Thanks, Anthony On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui larue...@gmail.com wrote: Sent from my iPad 在 2012-2-28,0:10,Anthony Ferrara ircmax...@gmail.com 写道: Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to plz look at the final fix: r323563 thanks r323563 Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch c...@l-i-e.com wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- 惠新宸 laruence Senior PHP Engineer http://www.laruence.com -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Tue, Feb 28, 2012 at 10:38 AM, Xinchen Hui larue...@gmail.com wrote: On Tue, Feb 28, 2012 at 1:10 AM, Anthony Ferrara ircmax...@gmail.com wrote: I initially looked at the final fix when I discovered the issue. Follow me out on this. This is the current code as-implemented in r323563: 265 zval *obj; 266 MAKE_STD_ZVAL(obj); 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { 268 zval_ptr_dtor(arg); 269 *arg = obj; 270 *pl = Z_STRLEN_PP(arg); 271 *p = Z_STRVAL_PP(arg); 272 return SUCCESS; 273 } 274 efree(obj); The issue that I originally identified (overwriting the argument pointer) is still happening. Is there any reason for overwriting the arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well Oops, you are right.. thanks for pointing this out. :) Sorry, I miss-read your words. so I revoke my previous words. the reason for why overwriting arg, is we should record that new temp zval(IS_STRING), then release it while doing cleanup parameters. and also, fo 5.3, no p and pl paramters. thanks (instead of efree, as that way if a reference is stored somewhere it won't result in a double free, or a segfault for accessing freed memory)? Thanks, Anthony On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui larue...@gmail.com wrote: Sent from my iPad 在 2012-2-28,0:10,Anthony Ferrara ircmax...@gmail.com 写道: Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to plz look at the final fix: r323563 thanks r323563 Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch c...@l-i-e.com wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes side effects may cause the similar problem. It would be great to make a right fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- 惠新宸 laruence Senior PHP Engineer http://www.laruence.com -- 惠新宸 laruence Senior PHP Engineer http://www.laruence.com -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce-cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui larue...@php.net wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; *pl = Z_STRLEN_PP(arg); *p = Z_STRVAL_PP(arg); return SUCCESS; } + zval_ptr_dtor(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/reflection/php_reflection.c branches/PHP_5_3/ext/reflection/tests/bug60367.phpt trunk/NEWS trunk/ext/reflection/php_reflecti
On Fri, Feb 3, 2012 at 17:27, Xinchen Hui larue...@php.net wrote: laruence Fri, 03 Feb 2012 16:27:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323045 Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()) Bug: https://bugs.php.net/60968 (Assigned) Late static binding doesn't work with ReflectionMethod::invokeArgs() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c U php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt U php/php-src/trunk/NEWS U php/php-src/trunk/ext/reflection/php_reflection.c U php/php-src/trunk/ext/reflection/tests/bug60367.phpt There is no need to update the trunk NEWS when its included in previous versions. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/reflection/php_reflection.c branches/PHP_5_3/ext/reflection/tests/bug60367.phpt trunk/NEWS trunk/ext/reflection/php_reflecti
Hi bjori: On Sat, Feb 4, 2012 at 8:33 PM, Hannes Magnusson hannes.magnus...@gmail.com wrote: On Fri, Feb 3, 2012 at 17:27, Xinchen Hui larue...@php.net wrote: laruence Fri, 03 Feb 2012 16:27:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323045 Log: Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()) Bug: https://bugs.php.net/60968 (Assigned) Late static binding doesn't work with ReflectionMethod::invokeArgs() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c U php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt U php/php-src/trunk/NEWS U php/php-src/trunk/ext/reflection/php_reflection.c U php/php-src/trunk/ext/reflection/tests/bug60367.phpt There is no need to update the trunk NEWS when its included in previous versions. I was told that we should update both 5.3/5.4 NEWS when fixe bugs. since 5.4 is in freeze period, so I update trunk NEWS. thanks -Hannes -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Sent from my iPhone 在 2012-1-25,15:49,Dmitry Stogov dmi...@zend.com 写道: On 01/25/2012 11:36 AM, Rasmus Lerdorf wrote: Still a known crash bug though. This is what our RCs are supposed to catch, right? This is not a single way to crash PHP with especially prepared code. Some of these ways are never going to be fixed. For me it doesn't mater if this patch will be committed before or after release. Anyway, the patch may have effect only on very specific PHP code and shouldn't make any harm. Indeed, I think we should been careful with *big* patch which might introduce new issues when in code freeze phase. Considering this little fix, it is no harm to commit to RC. :) Anyway it also okey for me to commit after release, since this is really a trivial bug and there are already one patche for me need to be remembered ci after 5.4.0 released. :) Thanks Thanks. Dmitry. On 01/24/2012 11:34 PM, Dmitry Stogov wrote: Hi Stas, Not a big problem, just yet another way to crash PHP locally with tricky code. It may be committed after release as well. Thanks. Dmitry. On 01/25/2012 11:29 AM, Stas Malyshev wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
hi! we need another RC anyway. There is another trait segfault and that openssl security bug. Cheers, On Wed, Jan 25, 2012 at 8:29 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
to be more specific: If we do not want to delay 5.4 any further (and I think we should not delay it any longer after this RC). We should simply stop any kind of commits after it, to follow the golden release rule. Only very critical security issues should be allowed, after approvals. It is also easy to release 5.4.1 shortly after final. Cheers, On Wed, Jan 25, 2012 at 10:25 AM, Pierre Joye pierre@gmail.com wrote: hi! we need another RC anyway. There is another trait segfault and that openssl security bug. Cheers, On Wed, Jan 25, 2012 at 8:29 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Hi! Considering this little fix, it is no harm to commit to RC. :) Anyway it also okey for me to commit after release, since this is really a trivial bug and there are already one patche for me need to be remembered ci after 5.4.0 released. :) OK, it looks like we're going to have another RC anyway, so please commit it to 5.4 too. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
HI Dmitry: could you please review this improved fix? thanks On Tue, Jan 24, 2012 at 10:39 PM, Xinchen Hui larue...@php.net wrote: laruence Tue, 24 Jan 2012 14:39:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322678 Log: Re-fixed bug #60825 (Segfault when running symfony 2 tests) Bug: https://bugs.php.net/60825 (Critical) Segfault when running symfony 2 tests Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug60825.phpt U php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/tests/bug60825.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Hi, Now it looks fine. I think it should be committed into 5.4 as well. Stas? Thanks. Dmitry. On 01/24/2012 06:43 PM, Laruence wrote: HI Dmitry: could you please review this improved fix? thanks On Tue, Jan 24, 2012 at 10:39 PM, Xinchen Huilarue...@php.net wrote: laruence Tue, 24 Jan 2012 14:39:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322678 Log: Re-fixed bug #60825 (Segfault when running symfony 2 tests) Bug: https://bugs.php.net/60825 (Critical) Segfault when running symfony 2 tests Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug60825.phpt U php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/tests/bug60825.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Hi Stas, Not a big problem, just yet another way to crash PHP locally with tricky code. It may be committed after release as well. Thanks. Dmitry. On 01/25/2012 11:29 AM, Stas Malyshev wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Still a known crash bug though. This is what our RCs are supposed to catch, right? On 01/24/2012 11:34 PM, Dmitry Stogov wrote: Hi Stas, Not a big problem, just yet another way to crash PHP locally with tricky code. It may be committed after release as well. Thanks. Dmitry. On 01/25/2012 11:29 AM, Stas Malyshev wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
Hi! Still a known crash bug though. This is what our RCs are supposed to catch, right? Right, but judging by current patten we're pushing the release further and further without any obvious end in sight. If we will wait with the release until we have 0 bugs in PHP (or even 0 possibility of segfault) we will never release, let alone adhere to any release RFC (which we already behind by 2 months). That's why I want to make a distinction between critical and non-critical things and not commit non-critical things now. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60825.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/NEWS trunk/Zend/tests
On 01/25/2012 11:36 AM, Rasmus Lerdorf wrote: Still a known crash bug though. This is what our RCs are supposed to catch, right? This is not a single way to crash PHP with especially prepared code. Some of these ways are never going to be fixed. For me it doesn't mater if this patch will be committed before or after release. Anyway, the patch may have effect only on very specific PHP code and shouldn't make any harm. Thanks. Dmitry. On 01/24/2012 11:34 PM, Dmitry Stogov wrote: Hi Stas, Not a big problem, just yet another way to crash PHP locally with tricky code. It may be committed after release as well. Thanks. Dmitry. On 01/25/2012 11:29 AM, Stas Malyshev wrote: Hi! Now it looks fine. I think it should be committed into 5.4 as well. Stas? That would probably require new RC, i.e. release will have to be pushed back. How serious is the problem we're talking about? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
hi, do you have a test case for this crash? Cheers, On Sun, Dec 18, 2011 at 6:14 AM, Scott MacVicar scott...@php.net wrote: scottmac Sun, 18 Dec 2011 05:14:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321094 Log: Fix segfault in older versions of OpenSSL (before 0.9.8i) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/openssl/openssl.c U php/php-src/trunk/ext/openssl/openssl.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-18 05:14:32 UTC (rev 321094) @@ -6,6 +6,9 @@ . Added max_input_vars directive to prevent attacks based on hash collisions (Dmitry). +- OpenSSL: + . Fix segfault with older versions of OpenSSL. (Scott) + - Streams: . Fixed bug #60455 (stream_get_line misbehaves if EOF is not detected together with the last read). (Gustavo) Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4713,7 +4713,9 @@ EVP_CIPHER_CTX_set_key_length(cipher_ctx, password_len); } EVP_EncryptInit_ex(cipher_ctx, NULL, NULL, key, (unsigned char *)iv); - EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i, i)) { outlen += i; Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_4/NEWS 2011-12-18 05:14:32 UTC (rev 321094) @@ -5,11 +5,16 @@ . Added max_input_vars directive to prevent attacks based on hash collisions (Dmitry). . Fixed bug #60536 (Traits Segfault). (Laruence) + - CLI SAPI: . Fixed bug #60477 (Segfault after two multipart/form-data POST requests, one 200 RQ and one 404). (Laruence) . Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI). (Laruence, Derick) + +- OpenSSL: + . Fix segfault with older versions of OpenSSL. (Scott) + - Pdo Firebird: . Fixed bug #48877 (bindValue and bindParam do not work for PDO Firebird). (Mariuz) Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4740,7 +4740,9 @@ if (options OPENSSL_ZERO_PADDING) { EVP_CIPHER_CTX_set_padding(cipher_ctx, 0); } - EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i, i)) { outlen += i; Modified: php/php-src/trunk/ext/openssl/openssl.c === --- php/php-src/trunk/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/trunk/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4736,7 +4736,9 @@ if (options OPENSSL_ZERO_PADDING) { EVP_CIPHER_CTX_set_padding(cipher_ctx, 0); } - EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf, i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i, i)) { outlen += i; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
I'm +1 on adding it for several reasons, one of which is there are plenty of RHEL 5 (and OL 5) sites out there. Chris PS the testcase wasn't attached to your email. On 12/18/2011 12:03 PM, Scott MacVicar wrote: It's not worth adding a test for, it's never going to re-occur and it only affects 4 year old versions of OpenSSL. Basically RHEL 5 is the only thing with a problem. I wrote one but don't want to add a somewhat useless test. Attached, but the extra second to test running isn't worth it. - Scott On 18 Dec 2011, at 03:49, Pierre Joye wrote: hi, do you have a test case for this crash? Cheers, On Sun, Dec 18, 2011 at 6:14 AM, Scott MacVicarscott...@php.net wrote: scottmac Sun, 18 Dec 2011 05:14:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321094 Log: Fix segfault in older versions of OpenSSL (before 0.9.8i) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/openssl/openssl.c U php/php-src/trunk/ext/openssl/openssl.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-18 05:14:32 UTC (rev 321094) @@ -6,6 +6,9 @@ . Added max_input_vars directive to prevent attacks based on hash collisions (Dmitry). +- OpenSSL: + . Fix segfault with older versions of OpenSSL. (Scott) + - Streams: . Fixed bug #60455 (stream_get_line misbehaves if EOF is not detected together with the last read). (Gustavo) Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4713,7 +4713,9 @@ EVP_CIPHER_CTX_set_key_length(cipher_ctx, password_len); } EVP_EncryptInit_ex(cipher_ctx, NULL, NULL, key, (unsigned char *)iv); - EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i,i)) { outlen += i; Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_4/NEWS 2011-12-18 05:14:32 UTC (rev 321094) @@ -5,11 +5,16 @@ . Added max_input_vars directive to prevent attacks based on hash collisions (Dmitry). . Fixed bug #60536 (Traits Segfault). (Laruence) + - CLI SAPI: . Fixed bug #60477 (Segfault after two multipart/form-data POST requests, one 200 RQ and one 404). (Laruence) . Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI). (Laruence, Derick) + +- OpenSSL: + . Fix segfault with older versions of OpenSSL. (Scott) + - Pdo Firebird: . Fixed bug #48877 (bindValue and bindParam do not work for PDO Firebird). (Mariuz) Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4740,7 +4740,9 @@ if (options OPENSSL_ZERO_PADDING) { EVP_CIPHER_CTX_set_padding(cipher_ctx, 0); } - EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i,i)) { outlen += i; Modified: php/php-src/trunk/ext/openssl/openssl.c === --- php/php-src/trunk/ext/openssl/openssl.c 2011-12-18 01:04:35 UTC (rev 321093) +++ php/php-src/trunk/ext/openssl/openssl.c 2011-12-18 05:14:32 UTC (rev 321094) @@ -4736,7 +4736,9 @@ if (options OPENSSL_ZERO_PADDING) { EVP_CIPHER_CTX_set_padding(cipher_ctx, 0); } - EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + if (data_len 0) { + EVP_EncryptUpdate(cipher_ctx, outbuf,i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(cipher_ctx, (unsigned char *)outbuf + i,i)) { outlen += i;
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
On Sun, Dec 18, 2011 at 9:03 PM, Scott MacVicar sc...@macvicar.net wrote: It's not worth adding a test for, it's never going to re-occur and it only affects 4 year old versions of OpenSSL. Basically RHEL 5 is the only thing with a problem. I wrote one but don't want to add a somewhat useless test. Attached, but the extra second to test running isn't worth it. As you have one at hand please apply it as well. There are still systems with patched ssl version (using this release) out there. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS main/main.c main/php_globals.h main/php_variables.c
hi Dmitry, As of yesterday, please add it to php.ini and to the UPGRADING guide :) Thanks! On Thu, Dec 15, 2011 at 9:47 AM, Dmitry Stogov dmi...@php.net wrote: dmitry Thu, 15 Dec 2011 08:47:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321038 Log: Added max_input_vars directive to prevent attacks based on hash collisions Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/main.c U php/php-src/branches/PHP_5_3/main/php_globals.h U php/php-src/branches/PHP_5_3/main/php_variables.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-15 07:28:28 UTC (rev 321037) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-15 08:47:03 UTC (rev 321038) @@ -2,6 +2,10 @@ ||| ?? ??? 2011, PHP 5.3.9 +- Core: + . Added max_input_vars directive to prevent attacks based on hash collisions + (Dmitry). + - Streams: . Fixed bug #60455 (stream_get_line misbehaves if EOF is not detected together with the last read). (Gustavo) Modified: php/php-src/branches/PHP_5_3/main/main.c === --- php/php-src/branches/PHP_5_3/main/main.c 2011-12-15 07:28:28 UTC (rev 321037) +++ php/php-src/branches/PHP_5_3/main/main.c 2011-12-15 08:47:03 UTC (rev 321038) @@ -512,6 +512,7 @@ STD_PHP_INI_ENTRY(post_max_size, 8M, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong, post_max_size, sapi_globals_struct,sapi_globals) STD_PHP_INI_ENTRY(upload_tmp_dir, NULL, PHP_INI_SYSTEM, OnUpdateStringUnempty, upload_tmp_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY(max_input_nesting_level, 64, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLongGEZero, max_input_nesting_level, php_core_globals, core_globals) + STD_PHP_INI_ENTRY(max_input_vars, 1000, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLongGEZero, max_input_vars, php_core_globals, core_globals) STD_PHP_INI_ENTRY(user_dir, NULL, PHP_INI_SYSTEM, OnUpdateString, user_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY(variables_order, EGPCS, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, variables_order, php_core_globals, core_globals) Modified: php/php-src/branches/PHP_5_3/main/php_globals.h === --- php/php-src/branches/PHP_5_3/main/php_globals.h 2011-12-15 07:28:28 UTC (rev 321037) +++ php/php-src/branches/PHP_5_3/main/php_globals.h 2011-12-15 08:47:03 UTC (rev 321038) @@ -174,6 +174,8 @@ #ifdef PHP_WIN32 zend_bool windows_show_crt_warning; #endif + + long max_input_vars; }; Modified: php/php-src/branches/PHP_5_3/main/php_variables.c === --- php/php-src/branches/PHP_5_3/main/php_variables.c 2011-12-15 07:28:28 UTC (rev 321037) +++ php/php-src/branches/PHP_5_3/main/php_variables.c 2011-12-15 08:47:03 UTC (rev 321038) @@ -191,6 +191,9 @@ } if (zend_symtable_find(symtable1, escaped_index, index_len + 1, (void **) gpc_element_p) == FAILURE || Z_TYPE_PP(gpc_element_p) != IS_ARRAY) { + if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini., PG(max_input_vars)); + } MAKE_STD_ZVAL(gpc_element); array_init(gpc_element); zend_symtable_update(symtable1, escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p); @@ -236,6 +239,9 @@ zend_symtable_exists(symtable1, escaped_index, index_len + 1)) { zval_ptr_dtor(gpc_element); } else { + if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, Input variables exceeded %ld.
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/parse_date.c branches/PHP_5_3/ext/date/lib/parse_date.re branches/PHP_5_3/ext/date/tests/bug54851.phpt branches/PHP
On Sat, Nov 26, 2011 at 17:44, Derick Rethans der...@php.net wrote: derick Sat, 26 Nov 2011 16:44:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319960 Log: - Fixed bug #54851 (DateTime::createFromFormat() doesn't interpret D). Bug: https://bugs.php.net/54851 (Assigned) DateTime::createFromFormat, $format=='D' or $format=='l' Always Returns Today. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c U php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re A php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt U php/php-src/branches/PHP_5_4/ext/date/lib/parse_date.c U php/php-src/branches/PHP_5_4/ext/date/lib/parse_date.re A php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt That test is failing completely for me.. ▪ cat ext/date/tests/bug54851.out Tue, 17 May 2011 22:14:12 + Fatal error: Call to a member function format() on a non-object in /date/tests/bug54851.php on line 5 Checking DateTime::getLastErrors() I get: [error_count]= int(2) [errors]= array(2) { [6]= string(37) A two digit minute could not be found [8]= string(38) A two second minute could not be found } ┌─[bjori][][⑆][PHP_5_4 ✗][~/Work/src/php/php/php-src/branches/PHP_5_4] └─▪ ./sapi/cli/php -r 'var_dump(DateTime::createFromFormat(D H i s, Tue 0 00 00));' object(DateTime)#1 (3) { [date]= string(19) 2011-12-06 00:00:00 [timezone_type]= int(3) [timezone]= string(11) Europe/Oslo } ┌─[bjori][][⑆][PHP_5_4 ✗][~/Work/src/php/php/php-src/branches/PHP_5_4] └─▪ ./sapi/cli/php -r 'var_dump(DateTime::createFromFormat(D H i s, Tue 0 0 00));' bool(false) ┌─[bjori][][⑆][PHP_5_4 ✗][~/Work/src/php/php/php-src/branches/PHP_5_4] -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/parse_date.c branches/PHP_5_3/ext/date/lib/parse_date.re branches/PHP_5_3/ext/date/tests/bug54851.phpt branches/PHP
On Sun, 4 Dec 2011, Hannes Magnusson wrote: On Sat, Nov 26, 2011 at 17:44, Derick Rethans der...@php.net wrote: derick Sat, 26 Nov 2011 16:44:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319960 Log: - Fixed bug #54851 (DateTime::createFromFormat() doesn't interpret D). Bug: https://bugs.php.net/54851 (Assigned) DateTime::createFromFormat, $format=='D' or $format=='l' Always Returns Today. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c U php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re A php/php-src/branches/PHP_5_3/ext/date/tests/bug54851.phpt U php/php-src/branches/PHP_5_4/ext/date/lib/parse_date.c U php/php-src/branches/PHP_5_4/ext/date/lib/parse_date.re A php/php-src/branches/PHP_5_4/ext/date/tests/bug54851.phpt That test is failing completely for me.. ▪ cat ext/date/tests/bug54851.out Tue, 17 May 2011 22:14:12 + Yeah, I have some more fixes on the way. Just tyding up! Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt branches/PHP_5_4/ext/pgsql/pgsql.c branches/PHP_5_4/ext/pgsql/t
Previous, missing news entry. On Tue, Nov 15, 2011 at 1:06 PM, Felipe Pena felipe...@gmail.com wrote: 2011/11/15 Ilia Alshanetsky il...@php.net: iliaa Tue, 15 Nov 2011 18:02:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319259 Log: Fixed bug #60244 (pg_fetch_* functions do not validate that row param is 0). Bug: https://bugs.php.net/60244 (Open) pg_fetch_* functions behave strangely with row = -1 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c A php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt U php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c A php/php-src/branches/PHP_5_4/ext/pgsql/tests/bug60244.phpt U php/php-src/trunk/ext/pgsql/pgsql.c A php/php-src/trunk/ext/pgsql/tests/bug60244.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php There is change in NEWS that seems accidentaly: +- Json: + . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects + with numeric string properties). (Ilia, dchurch at sciencelogic dot com) + -- Regards, Felipe Pena -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt branches/PHP_5_4/ext/pgsql/pgsql.c branches/PHP_5_4/ext/pgsql/t
2011/11/15 Ilia Alshanetsky il...@php.net: iliaa Tue, 15 Nov 2011 18:02:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=319259 Log: Fixed bug #60244 (pg_fetch_* functions do not validate that row param is 0). Bug: https://bugs.php.net/60244 (Open) pg_fetch_* functions behave strangely with row = -1 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c A php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt U php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c A php/php-src/branches/PHP_5_4/ext/pgsql/tests/bug60244.phpt U php/php-src/trunk/ext/pgsql/pgsql.c A php/php-src/trunk/ext/pgsql/tests/bug60244.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php There is change in NEWS that seems accidentaly: +- Json: + . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects +with numeric string properties). (Ilia, dchurch at sciencelogic dot com) + -- Regards, Felipe Pena -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/apache/mod_php5.c branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c br
sorry for wrong bug id, should be: Fixed bug #60205 (possible integer overflow in content_length) thanks On Thu, Nov 3, 2011 at 3:26 PM, Xinchen Hui larue...@php.net wrote: laruence Thu, 03 Nov 2011 07:26:09 + Revision: http://svn.php.net/viewvc?view=revisionrevision=318718 Log: Fixed bug #60206 (possible integer overflow in content_length) Bug: https://bugs.php.net/60206 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/sapi/apache/mod_php5.c U php/php-src/branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c U php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c U php/php-src/branches/PHP_5_3/sapi/apache_hooks/mod_php5.c U php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c U php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/sapi/apache/mod_php5.c U php/php-src/branches/PHP_5_4/sapi/apache2filter/sapi_apache2.c U php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c U php/php-src/branches/PHP_5_4/sapi/apache_hooks/mod_php5.c U php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c U php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c U php/php-src/trunk/sapi/apache/mod_php5.c U php/php-src/trunk/sapi/apache2filter/sapi_apache2.c U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c U php/php-src/trunk/sapi/apache_hooks/mod_php5.c U php/php-src/trunk/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60139.phpt branches/PHP_5_3/Zend/zend_closures.c branches/PHP_5_4/Zend/tests/bug60139.phpt branches/PHP_5_4/Zend/z
hi Dmitry! Thanks for this fix :) Can you add a note to the UPGRADING.INTERNALS please? About the new get_gc handler? Thanks! On Wed, Nov 2, 2011 at 7:31 AM, Dmitry Stogov dmi...@php.net wrote: dmitry Wed, 02 Nov 2011 06:31:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=318671 Log: Fixed bug #60139 (Anonymous functions create cycles not detected by the GC) Bug: https://bugs.php.net/60139 (Assigned) Anonymous functions create cycles not detected by the GC Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug60139.phpt U php/php-src/branches/PHP_5_3/Zend/zend_closures.c A php/php-src/branches/PHP_5_4/Zend/tests/bug60139.phpt U php/php-src/branches/PHP_5_4/Zend/zend_closures.c U php/php-src/branches/PHP_5_4/Zend/zend_gc.c U php/php-src/branches/PHP_5_4/Zend/zend_object_handlers.c U php/php-src/branches/PHP_5_4/Zend/zend_object_handlers.h A php/php-src/trunk/Zend/tests/bug60139.phpt U php/php-src/trunk/Zend/zend_closures.c U php/php-src/trunk/Zend/zend_gc.c U php/php-src/trunk/Zend/zend_object_handlers.c U php/php-src/trunk/Zend/zend_object_handlers.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsltprocessor.c
On Wed, Oct 5, 2011 at 11:56, Christian Stocker chr...@php.net wrote: chregu Wed, 05 Oct 2011 09:56:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=317759 Log: Added xsl.security_prefs ini option to define forbidden operations within XSLT stylesheets, default is not to enable write operations. This option won't be in 5.4, since there's a new method. Bug #54446 Bug: https://bugs.php.net/54446 (To be documented) Arbitrary file creation via libxslt 'output' extension Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c U php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.h U php/php-src/branches/PHP_5_3/ext/xsl/xsltprocessor.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-10-05 09:51:08 UTC (rev 317758) +++ php/php-src/branches/PHP_5_3/NEWS 2011-10-05 09:56:01 UTC (rev 317759) @@ -90,7 +90,13 @@ - SPL: . Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY). (jgotti at modedemploi dot fr, Hannes) + +- XSL: + . Added xsl.security_prefs ini option to define forbidden operations within XSLT + stylesheets, default is not to enable write operations. This option won't be + in 5.4, since there's a new method. Bug #54446 (Chregu, Nicolas Gregoire) + 23 Aug 2011, PHP 5.3.8 - Core: Modified: php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c === --- php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c 2011-10-05 09:51:08 UTC (rev 317758) +++ php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c 2011-10-05 09:56:01 UTC (rev 317759) @@ -141,6 +141,11 @@ } /* }}} */ +PHP_INI_BEGIN() +//XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_WRITE_FILE == 44 +PHP_INI_ENTRY(xsl.security_prefs, 44, PHP_INI_ALL, NULL) +PHP_INI_END() // comments are not allowed :) And please add this option to the php.ini-* files, with similar note as the news entry. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS ext/xsl/php_xsl.c ext/xsl/php_xsl.h ext/xsl/xsltprocessor.c
Fixed chregu On 06.10.11 16:31, Hannes Magnusson wrote: On Wed, Oct 5, 2011 at 11:56, Christian Stocker chr...@php.net wrote: chregu Wed, 05 Oct 2011 09:56:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=317759 Log: Added xsl.security_prefs ini option to define forbidden operations within XSLT stylesheets, default is not to enable write operations. This option won't be in 5.4, since there's a new method. Bug #54446 Bug: https://bugs.php.net/54446 (To be documented) Arbitrary file creation via libxslt 'output' extension Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c U php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.h U php/php-src/branches/PHP_5_3/ext/xsl/xsltprocessor.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-10-05 09:51:08 UTC (rev 317758) +++ php/php-src/branches/PHP_5_3/NEWS 2011-10-05 09:56:01 UTC (rev 317759) @@ -90,7 +90,13 @@ - SPL: . Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY). (jgotti at modedemploi dot fr, Hannes) + +- XSL: + . Added xsl.security_prefs ini option to define forbidden operations within XSLT +stylesheets, default is not to enable write operations. This option won't be +in 5.4, since there's a new method. Bug #54446 (Chregu, Nicolas Gregoire) + 23 Aug 2011, PHP 5.3.8 - Core: Modified: php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c === --- php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c 2011-10-05 09:51:08 UTC (rev 317758) +++ php/php-src/branches/PHP_5_3/ext/xsl/php_xsl.c 2011-10-05 09:56:01 UTC (rev 317759) @@ -141,6 +141,11 @@ } /* }}} */ +PHP_INI_BEGIN() +//XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_WRITE_FILE == 44 +PHP_INI_ENTRY(xsl.security_prefs, 44, PHP_INI_ALL, NULL) +PHP_INI_END() // comments are not allowed :) And please add this option to the php.ini-* files, with similar note as the news entry. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
On Mon, Sep 26, 2011 at 10:56, Pierre Joye paj...@php.net wrote: pajoye Mon, 26 Sep 2011 08:56:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=317307 Log: - update news Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -3,11 +3,13 @@ ?? ??? 2011, PHP 5.3.9 - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55649 (Undefined function Bug()). (Laruence) - . Fixed bug #55576: Cannot conditionally move uploaded file without race - condition. (Gustavo) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) + . Fixed bug #55576 (Cannot conditionally move uploaded file without race + condition). (Gustavo) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) @@ -15,7 +17,7 @@ HTTP POST request). (Hannes) . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) - . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) + . Fixed bug #55366 (keys lost when using substr_replace an array) (Arpad) . Fixed bug #55273 (base64_decode() with strict rejects whitespace after pad). (Ilia) . Fixed bug #54304 (RegexIterator::accept() doesn't work with scalar values). Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -5,11 +5,13 @@ . Improve the warning message of incompatible arguments. (Laruence) - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55705 (Omitting a callable typehinted argument causes a segfault). (Felipe, Laruence) . Fixed bug #55758 (Digest Authenticate missed in 5.4) . (Laruence) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) I thought we only listed news entries in the lowest branch? Stuff fixed in 5.3.x is very much expected to be fixed in 5.4.0. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
that's changes since last 5.4 releases and will be cleaned up in final. There was a discussion about that and it was told to do so. On Mon, Sep 26, 2011 at 2:32 PM, Hannes Magnusson hannes.magnus...@gmail.com wrote: On Mon, Sep 26, 2011 at 10:56, Pierre Joye paj...@php.net wrote: pajoye Mon, 26 Sep 2011 08:56:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=317307 Log: - update news Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -3,11 +3,13 @@ ?? ??? 2011, PHP 5.3.9 - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55649 (Undefined function Bug()). (Laruence) - . Fixed bug #55576: Cannot conditionally move uploaded file without race - condition. (Gustavo) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) + . Fixed bug #55576 (Cannot conditionally move uploaded file without race + condition). (Gustavo) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) @@ -15,7 +17,7 @@ HTTP POST request). (Hannes) . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) - . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) + . Fixed bug #55366 (keys lost when using substr_replace an array) (Arpad) . Fixed bug #55273 (base64_decode() with strict rejects whitespace after pad). (Ilia) . Fixed bug #54304 (RegexIterator::accept() doesn't work with scalar values). Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -5,11 +5,13 @@ . Improve the warning message of incompatible arguments. (Laruence) - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55705 (Omitting a callable typehinted argument causes a segfault). (Felipe, Laruence) . Fixed bug #55758 (Digest Authenticate missed in 5.4) . (Laruence) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) I thought we only listed news entries in the lowest branch? Stuff fixed in 5.3.x is very much expected to be fixed in 5.4.0. -Hannes -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
Where is that discussion? Would be nice to have this officially known, as it often becomes really weird during 5.3.42 and 5.4.3 development.. is bugfix XYZ including in that or that release :] -Hannes On Mon, Sep 26, 2011 at 15:00, Pierre Joye pierre@gmail.com wrote: that's changes since last 5.4 releases and will be cleaned up in final. There was a discussion about that and it was told to do so. On Mon, Sep 26, 2011 at 2:32 PM, Hannes Magnusson hannes.magnus...@gmail.com wrote: On Mon, Sep 26, 2011 at 10:56, Pierre Joye paj...@php.net wrote: pajoye Mon, 26 Sep 2011 08:56:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=317307 Log: - update news Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -3,11 +3,13 @@ ?? ??? 2011, PHP 5.3.9 - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55649 (Undefined function Bug()). (Laruence) - . Fixed bug #55576: Cannot conditionally move uploaded file without race - condition. (Gustavo) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) + . Fixed bug #55576 (Cannot conditionally move uploaded file without race + condition). (Gustavo) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) @@ -15,7 +17,7 @@ HTTP POST request). (Hannes) . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) - . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) + . Fixed bug #55366 (keys lost when using substr_replace an array) (Arpad) . Fixed bug #55273 (base64_decode() with strict rejects whitespace after pad). (Ilia) . Fixed bug #54304 (RegexIterator::accept() doesn't work with scalar values). Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:49:28 UTC (rev 317306) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-26 08:56:56 UTC (rev 317307) @@ -5,11 +5,13 @@ . Improve the warning message of incompatible arguments. (Laruence) - Core: + . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre) . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) . Fixed bug #55705 (Omitting a callable typehinted argument causes a segfault). (Felipe, Laruence) . Fixed bug #55758 (Digest Authenticate missed in 5.4) . (Laruence) + . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) I thought we only listed news entries in the lowest branch? Stuff fixed in 5.3.x is very much expected to be fixed in 5.4.0. -Hannes -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
On 09/26/2011 03:03 PM, Hannes Magnusson wrote: Where is that discussion? Would be nice to have this officially known, as it often becomes really weird during 5.3.42 and 5.4.3 development.. is bugfix XYZ including in that or that release :] We had it a while ago. It makes perfect sense to me to keep track of what is fixed between beta and rc versions. When we roll the final 5.4.0 release NEWS will contain just the differences between 5.3 and 5.4. When someone upgrades from beta-1 to beta-2 they would expect the NEWS file to contain a complete list of stuff that is new in this beta release. Same goes for any release. 5.3.x to 5.3.x+1 and 5.4.x and 5.4.x+1. The x+1 NEWS file should always contain the changes from x no matter where else that fix might appear. The only thing we do, which is probably what is confusing you, is that we reset at major release time. We expect people to come from 5.3.x to 5.4.0 so the NEWS file should reflect that. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_4/NEWS trunk/NEWS
Hi 2011/9/17 Xinchen Hui larue...@php.net: laruence Sat, 17 Sep 2011 03:23:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316897 Log: Update NEWS Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS U php/php-src/trunk/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:14:31 UTC (rev 316896) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:23:38 UTC (rev 316897) @@ -38,6 +38,8 @@ - MySQLi extension: . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is used). (Andrey) + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). + (eran at zend dot com, Laruence) - mysqlnd . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes) Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:14:31 UTC (rev 316896) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:23:38 UTC (rev 316897) @@ -4,7 +4,13 @@ - Core: . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) + . Fixed bug #55705 (Omitting a callable typehinted argument causes a segfault). + (Felipe, Laruence) +- MySQLi extension: + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). + (eran at zend dot com, Laruence) + 15 Sep 2011, PHP 5.4.0 Beta - General improvements: . Added callable typehint. (Hannes) Only the 5.3 NEWS should have been updated here. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_4/NEWS trunk/NEWS
Hi: done~ :) thanks 2011/9/17 Kalle Sommer Nielsen ka...@php.net: Hi 2011/9/17 Xinchen Hui larue...@php.net: laruence Sat, 17 Sep 2011 03:23:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316897 Log: Update NEWS Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS U php/php-src/trunk/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:14:31 UTC (rev 316896) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-17 03:23:38 UTC (rev 316897) @@ -38,6 +38,8 @@ - MySQLi extension: . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is used). (Andrey) + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). + (eran at zend dot com, Laruence) - mysqlnd . Fixed bug #55609 (mysqlnd cannot be built shared). (Johannes) Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:14:31 UTC (rev 316896) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-17 03:23:38 UTC (rev 316897) @@ -4,7 +4,13 @@ - Core: . Fixed bug #55707 (undefined reference to `__sync_fetch_and_add_4' on Linux parisc). (Felipe) + . Fixed bug #55705 (Omitting a callable typehinted argument causes a segfault). + (Felipe, Laruence) +- MySQLi extension: + . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). + (eran at zend dot com, Laruence) + 15 Sep 2011, PHP 5.4.0 Beta - General improvements: . Added callable typehint. (Hannes) Only the 5.3 NEWS should have been updated here. -- regards, Kalle Sommer Nielsen ka...@php.net -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS Zend/zend_builtin_functions.c
On Thu, Sep 15, 2011 at 11:58 AM, Dmitry Stogov dmi...@php.net wrote: dmitry Thu, 15 Sep 2011 09:58:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316810 Log: Fixed bug #55475 (is_a() triggers autoloader). (alan at akbkhome dot com) Bug: https://bugs.php.net/55475 (Assigned) is_a() triggers autoloader Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-15 09:15:07 UTC (rev 316809) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-15 09:58:33 UTC (rev 316810) @@ -3,19 +3,20 @@ ?? ??? 2011, PHP 5.3.9 - Core: - . Fixed Bug #55649 (Undefined function Bug()). (Laruence) + . Fixed bug #55649 (Undefined function Bug()). (Laruence) . Fixed bug #55576: Cannot conditionally move uploaded file without race condition. (Gustavo) - . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) - . Fixed bug #55273 (base64_decode() with strict rejects whitespace after - pad). (Ilia) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) . Fixed bug #55504 (Content-Type header is not parsed correctly on HTTP POST request). (Hannes) + . Fixed bug #55475 (is_a() triggers autoloader). (alan at akbkhome dot com) . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) + . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) + . Fixed bug #55273 (base64_decode() with strict rejects whitespace after + pad). (Ilia) - Curl: . Fixed bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed Modified: php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c === --- php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c 2011-09-15 09:15:07 UTC (rev 316809) +++ php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c 2011-09-15 09:58:33 UTC (rev 316810) @@ -822,7 +822,7 @@ return; } - if (Z_TYPE_P(obj) == IS_STRING) { + if (only_subclass Z_TYPE_P(obj) == IS_STRING) { zend_class_entry **the_ce; if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), the_ce TSRMLS_CC) == FAILURE) { RETURN_FALSE; so we are now reverting back to the old behavior? I didn't expected that by the discussion on the mailing list. -- Ferenc Kovács @Tyr43l - http://tyrael.hu -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS Zend/zend_builtin_functions.c
On Thu, 2011-09-15 at 12:28 +0200, Ferenc Kovacs wrote: so we are now reverting back to the old behavior? I didn't expected that by the discussion on the mailing list. ack, we shouldn't have changed the behavior in the fist place. But going back and forth is creating an even bigger mess. johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
On Tue, Sep 13, 2011 at 15:11, Xinchen Hui larue...@php.net wrote: laruence Tue, 13 Sep 2011 13:11:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316622 Log: update news Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-13 13:02:57 UTC (rev 316621) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-13 13:11:42 UTC (rev 316622) @@ -59,6 +59,9 @@ instead of false when no nodes are found as it was since 5.3.3 (bug #48601). (chregu, rrichards) +- String: + . Fixed bug #55674 (fgetcsv str_getcsv skip empty fields in some tab-separated + records). (Laruence) 23 Aug 2011, PHP 5.3.8 Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-09-13 13:02:57 UTC (rev 316621) +++ php/php-src/branches/PHP_5_4/NEWS 2011-09-13 13:11:42 UTC (rev 316622) @@ -365,6 +365,7 @@ - Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect). (Andrey, Laruence) - Fixed bug #55423 (cli-server could not output correctly in some case). (Laruence, chobieee at gmail dot com) - Fixed bug #55653 (PS crash with libmysql when binding same variable as param and out). (Laruence) +- Fixed bug #55674 (fgetcsv str_getcsv skip empty fields in some tab-separated records). (Laruence) We only add NEWS entries to the lowest relased branch.. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend
Dmitry, This is diffing for me in 5.4 (I've haven't looked at 5.3 or trunk): 007+ Fatal error: Allowed memory size of 3221225472 bytes exhausted at /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/standard/string.c:4636 (tried to allocate 536870913 bytes) in /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/tests/bug55509.php on line 12 007- Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s/bug55509.php on line %d Chris On 09/13/2011 12:01 AM, Dmitry Stogov wrote: dmitry Tue, 13 Sep 2011 07:01:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316590 Log: Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more than 2G memory Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt U php/php-src/branches/PHP_5_3/Zend/zend_alloc.c A php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt U php/php-src/branches/PHP_5_4/Zend/zend_alloc.c A php/php-src/trunk/Zend/tests/bug55509.phpt U php/php-src/trunk/Zend/zend_alloc.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-13 06:22:25 UTC (rev 316589) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-13 07:01:46 UTC (rev 316590) @@ -8,6 +8,7 @@ . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) + . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) . Fixed bug #55576: Cannot conditionally move uploaded file without race condition. (Gustavo) . Fixed bug #55504 (Content-Type header is not parsed correctly on Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt 2011-09-13 07:01:46 UTC (rev 316590) @@ -0,0 +1,33 @@ +--TEST-- +Bug #55509 (segfault on x86_64 using more than 2G memory) +--SKIPIF-- +?php +if (PHP_INT_SIZE == 4) { + die('skip Not for 32-bits OS'); +} +? +--INI-- +memory_limit=3G +--FILE-- +?php +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5); +echo 1\n; +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5); +echo 2\n; +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5); +echo 3\n; +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5); +echo 4\n; +$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5); +echo 5\n; +$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5); +echo 6\n; +? +--EXPECTF-- +1 +2 +3 +4 +5 + +Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s/bug55509.php on line %d Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c === --- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c 2011-09-13 06:22:25 UTC (rev 316589) +++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c 2011-09-13 07:01:46 UTC (rev 316590) @@ -510,7 +510,7 @@ #define ZEND_MM_IS_GUARD_BLOCK(b) (((b)-info._size ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK) #define ZEND_MM_NEXT_BLOCK(b) ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b)) -#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(int)((b)-info._prev ~ZEND_MM_TYPE_MASK)) +#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(ssize_t)((b)-info._prev ~ZEND_MM_TYPE_MASK)) #define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)-info._prev ZEND_MM_USED_BLOCK)) Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt 2011-09-13 07:01:46 UTC (rev 316590) @@ -0,0 +1,33 @@ +--TEST-- +Bug #55509 (segfault on x86_64 using more than 2G memory) +--SKIPIF-- +?php +if (PHP_INT_SIZE == 4) { + die('skip Not for 32-bits OS'); +} +? +--INI-- +memory_limit=3G +--FILE-- +?php +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5); +echo 1\n; +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5); +echo 2\n; +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5); +echo 3\n; +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5); +echo 4\n; +$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5); +echo 5\n; +$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5); +echo 6\n; +? +--EXPECTF-- +1 +2 +3 +4 +5 + +Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s/bug55509.php on line %d Modified: php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend
Hi: anyone has Zend karma, plz help dmitry to fix this litte bug. specifically, change the expect warning to : Fatal error: Allowed memory size of %d bytes exhausted at %s (tried to allocate %d bytes) in %s/bug55509.php on line %d thanks 2011/9/14 Christopher Jones christopher.jo...@oracle.com: Dmitry, This is diffing for me in 5.4 (I've haven't looked at 5.3 or trunk): 007+ Fatal error: Allowed memory size of 3221225472 bytes exhausted at /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/standard/string.c:4636 (tried to allocate 536870913 bytes) in /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/tests/bug55509.php on line 12 007- Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s/bug55509.php on line %d Chris On 09/13/2011 12:01 AM, Dmitry Stogov wrote: dmitry Tue, 13 Sep 2011 07:01:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316590 Log: Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more than 2G memory Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt U php/php-src/branches/PHP_5_3/Zend/zend_alloc.c A php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt U php/php-src/branches/PHP_5_4/Zend/zend_alloc.c A php/php-src/trunk/Zend/tests/bug55509.phpt U php/php-src/trunk/Zend/zend_alloc.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-09-13 06:22:25 UTC (rev 316589) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-13 07:01:46 UTC (rev 316590) @@ -8,6 +8,7 @@ . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad) . Fixed bug #55510: $_FILES 'name' missing first character after upload. (Arpad) + . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence) . Fixed bug #55576: Cannot conditionally move uploaded file without race condition. (Gustavo) . Fixed bug #55504 (Content-Type header is not parsed correctly on Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt 2011-09-13 07:01:46 UTC (rev 316590) @@ -0,0 +1,33 @@ +--TEST-- +Bug #55509 (segfault on x86_64 using more than 2G memory) +--SKIPIF-- +?php +if (PHP_INT_SIZE == 4) { + die('skip Not for 32-bits OS'); +} +? +--INI-- +memory_limit=3G +--FILE-- +?php +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5); +echo 1\n; +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5); +echo 2\n; +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5); +echo 3\n; +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5); +echo 4\n; +$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5); +echo 5\n; +$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5); +echo 6\n; +? +--EXPECTF-- +1 +2 +3 +4 +5 + +Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s/bug55509.php on line %d Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c === --- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c 2011-09-13 06:22:25 UTC (rev 316589) +++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c 2011-09-13 07:01:46 UTC (rev 316590) @@ -510,7 +510,7 @@ #define ZEND_MM_IS_GUARD_BLOCK(b) (((b)-info._size ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK) #define ZEND_MM_NEXT_BLOCK(b) ZEND_MM_BLOCK_AT(b, ZEND_MM_BLOCK_SIZE(b)) -#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(int)((b)-info._prev ~ZEND_MM_TYPE_MASK)) +#define ZEND_MM_PREV_BLOCK(b) ZEND_MM_BLOCK_AT(b, -(ssize_t)((b)-info._prev ~ZEND_MM_TYPE_MASK)) #define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)-info._prev ZEND_MM_USED_BLOCK)) Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt 2011-09-13 07:01:46 UTC (rev 316590) @@ -0,0 +1,33 @@ +--TEST-- +Bug #55509 (segfault on x86_64 using more than 2G memory) +--SKIPIF-- +?php +if (PHP_INT_SIZE == 4) { + die('skip Not for 32-bits OS'); +} +? +--INI-- +memory_limit=3G +--FILE-- +?php +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5); +echo 1\n; +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5); +echo 2\n; +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5); +echo 3\n; +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5); +echo 4\n; +$a5 =
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/crypt.c branches/PHP_5_3/ext/standard/tests/strings/crypt_variation1.phpt branches/PHP_5_4/ext/standard/crypt.c bra
On Tue, Jul 5, 2011 at 01:38, Stanislav Malyshev s...@php.net wrote: stas Mon, 04 Jul 2011 23:38:09 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312919 Log: fix crypt() issue with overlong salt Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/crypt.c A php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_variation1.phpt U php/php-src/branches/PHP_5_4/ext/standard/crypt.c A php/php-src/branches/PHP_5_4/ext/standard/tests/strings/crypt_variation1.phpt A php/php-src/trunk/ext/standard/tests/strings/crypt_variation1.phpt Shouldn't this be merged to trunk too? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/crypt.c branches/PHP_5_3/ext/standard/tests/strings/crypt_variation1.phpt branches/PHP_5_4/ext/standard/crypt.c bra
Hi! On 9/12/11 3:04 AM, Hannes Magnusson wrote: Shouldn't this be merged to trunk too? Thanks, somehow I forgot to merge it. Done now. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c branches/PHP_5_3/ext/curl/tests/bug48203.phpt branches/PHP_5_3/ext/curl/tests/bug54798.phpt branches/PHP_5_
On Thu, Sep 8, 2011 at 21:53, Alexey Shein con...@gmail.com wrote: Hello, Hannes! It seems your fix is wrong, bug54798 still fails on my machine on trunk, 5.4 and 5.3 branches (ubuntu x64). IMO you should move your patch one line upper, i.e. before call to _php_curl_cleanup_handle(ch); since error is rasing there. Hmmh. Your right, it is failing. Maybe I screwed something up while merging between the branches. I'll check it out. There's also related bug with curl_multi part, see bug48203_multi.phpt These tests fail for me now on trunk (it seems I forgot to add some of them to other branches, please, consider trunk first): It was quite confusing why some tests were passing in 5_4, but the same test didn't on trunk. Turns out the trunk test wasn't even remotely similar to the 5_4 test yesterday :) I've merged the test cases now so it should be easier to figure out what is going on :] There are several memleaks also detected by the test suite that needs to be looked at. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c branches/PHP_5_3/ext/curl/tests/bug48203.phpt branches/PHP_5_3/ext/curl/tests/bug54798.phpt branches/PHP_5_
Hello, Hannes! It seems your fix is wrong, bug54798 still fails on my machine on trunk, 5.4 and 5.3 branches (ubuntu x64). IMO you should move your patch one line upper, i.e. before call to _php_curl_cleanup_handle(ch); since error is rasing there. I've also made some patches for this, could you review them and comment what's wrong there, see them and discussion here: http://markmail.org/message/yhywjpaiy3ttgfj5 There's also related bug with curl_multi part, see bug48203_multi.phpt These tests fail for me now on trunk (it seems I forgot to add some of them to other branches, please, consider trunk first): FAILED TEST SUMMARY - Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec) [ext/curl/tests/bug48203_multi.phpt] Bug #48203 (Crash when file pointers passed to curl are closed before calling curl_exec) [ext/curl/tests/bug54798.phpt] Memory corruption error if fp of just created file is closed before curl_close. [ext/curl/tests/curl_file_deleted_before_curl_close.phpt] curl_setopt basic tests with CURLOPT_STDERR. [ext/curl/tests/curl_setopt_basic002.phpt] Thanks. 2011/9/8 Hannes Magnusson bj...@php.net: bjori Thu, 08 Sep 2011 14:37:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316417 Log: Fixed bug#54798 Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec Bug: https://bugs.php.net/54798 (Assigned) Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203.phpt A php/php-src/branches/PHP_5_3/ext/curl/tests/bug54798.phpt U php/php-src/branches/PHP_5_4/ext/curl/interface.c U php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203.phpt A php/php-src/branches/PHP_5_4/ext/curl/tests/bug54798.phpt U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/tests/bug48203.phpt A php/php-src/trunk/ext/curl/tests/bug54798.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Regards, Shein Alexey -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
On Mon, Aug 29, 2011 at 23:45, Arpad Ray ar...@php.net wrote: arpad Mon, 29 Aug 2011 21:45:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=315747 Log: news entry for r66021 Log: Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-08-29 21:35:28 UTC (rev 315746) +++ php/php-src/branches/PHP_5_3/NEWS 2011-08-29 21:45:42 UTC (rev 315747) @@ -5,6 +5,7 @@ - Core: . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) + . Fixed bug #55366: keys lost when using substr_replace an array (arpad) ..And remove it from the 5.4 news. We generally use our firstnames, not usernames, ... so capitalize the first letter :) -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS
Hi 2011/8/30 Arpad Ray ar...@php.net: arpad Tue, 30 Aug 2011 14:01:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=315784 Log: fix news entries Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-08-30 14:01:03 UTC (rev 315783) +++ php/php-src/branches/PHP_5_3/NEWS 2011-08-30 14:01:35 UTC (rev 315784) @@ -5,7 +5,8 @@ - Core: . Fixed bug #52461 (Incomplete doctype and missing xmlns). (virsacer at web dot de, Pierre) - . Fixed bug #55366: keys lost when using substr_replace an array (arpad) + . Fixed bug #55366: keys lost when using substr_replace an array (Arpad) + . Fixed bug #55510: $_FILES 'name' missing first character after upload (Arpad) Please list newest bugs first (descending) and use the Fixed bug #no (desc) (who) syntax like the others :) -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_
Hi Folks: On Thu, Jul 07, 2011 at 02:20:50PM -0700, Stas Malyshev wrote: In fact, I'm not sure why would we need such warning at all. Unknown class - return false, who cares? +1 Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_5_3/Zend/zend_builtin_functions.c branches/PHP_5_3/e
Hi, I was told (didn't verify) that this causes lots of trouble with PEAR and other applications. We're in final RC phase of 5.3.7. I don't think it is critical for 5.3.7 and I wonder whether we need it for 5.3 at all. johannes On Mon, 2011-07-04 at 14:55 +, Dmitry Stogov wrote: dmitry Mon, 04 Jul 2011 14:55:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312904 Log: Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) Bug: https://bugs.php.net/53727 (Assigned) Inconsistent behavior of is_subclass_of with interfaces Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_3/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_3/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/branches/PHP_5_4/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_4/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_4/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/trunk/Zend/tests/bug53727.phpt U php/php-src/trunk/Zend/tests/is_a.phpt U php/php-src/trunk/Zend/zend_builtin_functions.c U php/php-src/trunk/ext/standard/tests/class_object/is_a_variation_001.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_5_3/Zend/zend_builtin_functi
what kind of troubles do they see? 2011/7/7 Johannes Schlüter johan...@schlueters.de: Hi, I was told (didn't verify) that this causes lots of trouble with PEAR and other applications. We're in final RC phase of 5.3.7. I don't think it is critical for 5.3.7 and I wonder whether we need it for 5.3 at all. johannes On Mon, 2011-07-04 at 14:55 +, Dmitry Stogov wrote: dmitry Mon, 04 Jul 2011 14:55:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312904 Log: Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) Bug: https://bugs.php.net/53727 (Assigned) Inconsistent behavior of is_subclass_of with interfaces Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_3/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_3/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/branches/PHP_5_4/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_4/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_4/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/trunk/Zend/tests/bug53727.phpt U php/php-src/trunk/Zend/tests/is_a.phpt U php/php-src/trunk/Zend/zend_builtin_functions.c U php/php-src/trunk/ext/standard/tests/class_object/is_a_variation_001.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_5_3/Zend/zend_builtin_functi
On Thu, 2011-07-07 at 20:27 +0200, Pierre Joye wrote: what kind of troubles do they see? https://pear.php.net/bugs/bug.php?id=18656 Even if the Warning is good it's questionable for 5.3, especially during RC. (note that warnings not only cause the error being reported, which can be switched off and fill logfiles but also triggers error handlers which won't expect this ...) johannes 2011/7/7 Johannes Schlüter johan...@schlueters.de: Hi, I was told (didn't verify) that this causes lots of trouble with PEAR and other applications. We're in final RC phase of 5.3.7. I don't think it is critical for 5.3.7 and I wonder whether we need it for 5.3 at all. johannes On Mon, 2011-07-04 at 14:55 +, Dmitry Stogov wrote: dmitry Mon, 04 Jul 2011 14:55:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312904 Log: Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces) Bug: https://bugs.php.net/53727 (Assigned) Inconsistent behavior of is_subclass_of with interfaces Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_3/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_3/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/branches/PHP_5_4/Zend/tests/bug53727.phpt U php/php-src/branches/PHP_5_4/Zend/tests/is_a.phpt U php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c U php/php-src/branches/PHP_5_4/ext/standard/tests/class_object/is_a_variation_001.phpt A php/php-src/trunk/Zend/tests/bug53727.phpt U php/php-src/trunk/Zend/tests/is_a.phpt U php/php-src/trunk/Zend/zend_builtin_functions.c U php/php-src/trunk/ext/standard/tests/class_object/is_a_variation_001.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug53727.phpt branches/PHP_5_3/Zend/tests/is_a.phpt branches/PHP_5_3/Zend/zend_builtin_fu
Hi! On 7/7/11 2:08 PM, Johannes Schlüter wrote: On Thu, 2011-07-07 at 20:27 +0200, Pierre Joye wrote: what kind of troubles do they see? https://pear.php.net/bugs/bug.php?id=18656 Even if the Warning is good it's questionable for 5.3, especially during RC. Yes, I had problem with it too in couple of cases, breaks some unit tests. In fact, I'm not sure why would we need such warning at all. Unknown class - return false, who cares? PHP is way too talkative anyway, which leads to a tons of boilerplate code that serve no useful purpose but to shut it up. But leaving that aside, I think 5.3 shouldn't have this additional warning this late. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/config.m4 branches/PHP_5_3/sapi/fpm/fpm/fpm.c branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h branches/PHP_5_3/sapi/fpm/fpm/
On Sun, 2011-06-26 at 15:48 +, Jérôme Loyet wrote: fat Sun, 26 Jun 2011 15:48:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=312496 Log: - Replaced shm_slots with a real scoreboard - Added several improvements to the status page This looks like a rather big change. Is that needed for 5.3.7? johannes Changed paths: changed paths exceeded maximum size -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/config.m4 branches/PHP_5_3/sapi/fpm/fpm/fpm.c branches/PHP_5_3/sapi/fpm/fpm/fpm_atomic.h branches/PHP_5_3/sapi/fpm/fpm/
This looks like a rather big change. Is that needed for 5.3.7? Even if it looks big, it's not that big. I've extended the SHM usage and renamed it to scoreboard. It's not necessary needed for 5.3.7. ++ Jerome -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/intl/php_intl.c branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt branches/PHP_5_4/ext/intl/php_intl.c branches
It seems the bug reporter preferred the data version.. I'd say include it too, doesn't hurt atleast :) -Hannes On Thu, Jun 2, 2011 at 19:09, Ilia Alshanetsky i...@prohost.org wrote: The version is already printed in phpinfo(), I am not sure we need to bring the data version... What do you think? On Thu, Jun 2, 2011 at 11:37 AM, Hannes Magnusson hannes.magnus...@gmail.com wrote: On Wed, Jun 1, 2011 at 18:26, Ilia Alshanetsky il...@php.net wrote: iliaa Wed, 01 Jun 2011 16:26:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311714 Log: Implemented FR #54561 (Expose ICU Version ICU Data Version info). Bug: http://bugs.php.net/54561 (Assigned) Expose ICU version info Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/intl/php_intl.c A php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/branches/PHP_5_4/ext/intl/php_intl.c A php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/trunk/ext/intl/php_intl.c A php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:26:21 UTC (rev 311714) @@ -90,6 +90,7 @@ - intl extension: . Implemented FR #54540 (Allow loading of arbitrary resource bundles when fallback is disabled). (David Zuelke, Stas) + . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia) - json extension: . Fixed bug #54484 (Empty string in json_decode doesn't reset Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c === --- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:26:21 UTC (rev 311714) @@ -543,6 +543,10 @@ REGISTER_INI_ENTRIES(); REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, CONST_CS); + REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, CONST_PERSISTENT | CONST_CS); +#ifdef U_ICU_DATA_VERSION + REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS); +#endif Print it in phpinfo() too? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/intl/php_intl.c branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt branches/PHP_5_4/ext/intl/php_intl.c branches
On Wed, Jun 1, 2011 at 18:26, Ilia Alshanetsky il...@php.net wrote: iliaa Wed, 01 Jun 2011 16:26:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311714 Log: Implemented FR #54561 (Expose ICU Version ICU Data Version info). Bug: http://bugs.php.net/54561 (Assigned) Expose ICU version info Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/intl/php_intl.c A php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/branches/PHP_5_4/ext/intl/php_intl.c A php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/trunk/ext/intl/php_intl.c A php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:26:21 UTC (rev 311714) @@ -90,6 +90,7 @@ - intl extension: . Implemented FR #54540 (Allow loading of arbitrary resource bundles when fallback is disabled). (David Zuelke, Stas) + . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia) - json extension: . Fixed bug #54484 (Empty string in json_decode doesn't reset Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c === --- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:26:21 UTC (rev 311714) @@ -543,6 +543,10 @@ REGISTER_INI_ENTRIES(); REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, CONST_CS); + REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, CONST_PERSISTENT | CONST_CS); +#ifdef U_ICU_DATA_VERSION + REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS); +#endif Print it in phpinfo() too? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/intl/php_intl.c branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt branches/PHP_5_4/ext/intl/php_intl.c branches
The version is already printed in phpinfo(), I am not sure we need to bring the data version... What do you think? On Thu, Jun 2, 2011 at 11:37 AM, Hannes Magnusson hannes.magnus...@gmail.com wrote: On Wed, Jun 1, 2011 at 18:26, Ilia Alshanetsky il...@php.net wrote: iliaa Wed, 01 Jun 2011 16:26:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311714 Log: Implemented FR #54561 (Expose ICU Version ICU Data Version info). Bug: http://bugs.php.net/54561 (Assigned) Expose ICU version info Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/intl/php_intl.c A php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/branches/PHP_5_4/ext/intl/php_intl.c A php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt U php/php-src/trunk/ext/intl/php_intl.c A php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 16:26:21 UTC (rev 311714) @@ -90,6 +90,7 @@ - intl extension: . Implemented FR #54540 (Allow loading of arbitrary resource bundles when fallback is disabled). (David Zuelke, Stas) + . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia) - json extension: . Fixed bug #54484 (Empty string in json_decode doesn't reset Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c === --- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:23:43 UTC (rev 311713) +++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c 2011-06-01 16:26:21 UTC (rev 311714) @@ -543,6 +543,10 @@ REGISTER_INI_ENTRIES(); REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, CONST_CS); + REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, CONST_PERSISTENT | CONST_CS); +#ifdef U_ICU_DATA_VERSION + REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS); +#endif Print it in phpinfo() too? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c
Hi, this might be a good thing for consistency and maybe reflect expectations more, but changing a warning to (possibly) an exception, which is fatal is a quite big change. Isn't it? johannes On Wed, 2011-06-01 at 13:23 +, Ilia Alshanetsky wrote: iliaaWed, 01 Jun 2011 13:23:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311711 Log: Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE settings). Bug: http://bugs.php.net/52104 (Assigned) bindColumn creates Warning regardless of ATTR_ERRMODE settings Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c U php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c U php/php-src/trunk/ext/pdo/pdo_stmt.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 13:23:25 UTC (rev 311711) @@ -115,6 +115,10 @@ set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey) . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator and range). (nihen at megabbs dot com, Andrey) + +- PDO extension: + . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE +settings). (Ilia) - PDO DBlib driver: . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field). Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c === --- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c === --- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c === --- php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c
Johannes, As the bug report mentions the current behaviour is un-expected and this change does not necessarily make the error fatal, since it'll abide by the error emitting config the user specifies for PDO as opposed to ignoring it.. 2011/6/1 Johannes Schlüter johan...@schlueters.de: Hi, this might be a good thing for consistency and maybe reflect expectations more, but changing a warning to (possibly) an exception, which is fatal is a quite big change. Isn't it? johannes On Wed, 2011-06-01 at 13:23 +, Ilia Alshanetsky wrote: iliaa Wed, 01 Jun 2011 13:23:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311711 Log: Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE settings). Bug: http://bugs.php.net/52104 (Assigned) bindColumn creates Warning regardless of ATTR_ERRMODE settings Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c U php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c U php/php-src/trunk/ext/pdo/pdo_stmt.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 13:23:25 UTC (rev 311711) @@ -115,6 +115,10 @@ set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey) . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator and range). (nihen at megabbs dot com, Andrey) + +- PDO extension: + . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE + settings). (Ilia) - PDO DBlib driver: . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field). Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c === --- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c === --- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c === --- php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev 311710) +++ php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev 311711) @@ -349,7 +349,10 @@ /* if you prepare and then execute passing an array of params keyed by names, * then this will trigger, and we don't want that */ if (param-paramno == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not found column name '%s' in the defined columns; it will not be bound, param-name); + char *tmp; + spprintf(tmp, 0, Did not find column name '%s' in the defined columns; it will not be bound, param-name); + pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp TSRMLS_CC); + efree(tmp); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54910.phpt branches/PHP_5_3/Zend/zend_API.c trunk/Zend/tests/bug54910.phpt trunk/Zend/zend_API.c
Please merge into 5.4 branch as well. Thanks On Tue, May 31, 2011 at 11:20 AM, Dmitry Stogov dmi...@php.net wrote: dmitry Tue, 31 May 2011 09:20:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311635 Log: Fixed bug #54910 (Crash when calling call_user_func with unknown function name) Bug: http://bugs.php.net/54910 (Assigned) Crash when calling call_user_func with unknown function name Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt U php/php-src/branches/PHP_5_3/Zend/zend_API.c A php/php-src/trunk/Zend/tests/bug54910.phpt U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:20:51 UTC (rev 311635) @@ -6,6 +6,8 @@ - Increased the backtrack limit from 10 to 100 (Rasmus) - Zend Engine: + . Fixed bug #54910 (Crash when calling call_user_func with unknown function + name). (Dmitry) . Fixed bug #54804 (__halt_compiler and imported namespaces). (Pierrick, Felipe) . Fixed bug #54585 (track_errors causes segfault). (Dmitry) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { + public function __call($method, $args) { + if (stripos($method, 'get') === 0) { + return $this-get(); + } + die(No such method - '$method'\n); + } + + protected function get() { + $class = get_class($this); + $call = array($class, 'noSuchMethod'); + + if (is_callable($call)) { + call_user_func($call); + } + } +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-05-31 09:20:51 UTC (rev 311635) @@ -2590,6 +2590,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry + instanceof_function(Z_OBJCE_P(EG(This)), fcc-calling_scope TSRMLS_CC)) { + fcc-object_ptr = EG(This); + } } } } Added: php/php-src/trunk/Zend/tests/bug54910.phpt === --- php/php-src/trunk/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { + public function __call($method, $args) { + if (stripos($method, 'get') === 0) { + return $this-get(); + } + die(No such method - '$method'\n); + } + + protected function get() { + $class = get_class($this); + $call = array($class, 'noSuchMethod'); + + if (is_callable($call)) { + call_user_func($call); + } + } +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:20:51 UTC (rev 311635) @@ -2773,6 +2773,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry +
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug54623.phpt branches/PHP_5_3/main/streams/streams.c trunk/ext/standard/tests/streams/bug54623.phpt
The test segfaults here. And Valgrind shows this: ==21439== Invalid read of size 8 ==21439==at 0x8EDC69: _php_stream_write (streams.c:1085) ==21439==by 0x826C0A: zif_fwrite (file.c:1294) ==21439==by 0x97C392: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320) ==21439==by 0x98092B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634) ==21439==by 0x97B84E: execute (zend_vm_execute.h:107) ==21439==by 0x947F26: zend_execute_scripts (zend.c:1194) ==21439==by 0x8D2DC2: php_execute_script (main.c:2275) ==21439==by 0xA2C00D: main (php_cli.c:1193) ==21439== Address 0xa73d7d0 is 0 bytes inside a block of size 240 free'd ==21439==at 0x4C2599C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21439==by 0x8EC55E: _php_stream_free (streams.c:442) ==21439==by 0x8FD3CF: _php_stream_xport_create (transports.c:83) ==21439==by 0x8327BB: php_fsockopen_stream (fsock.c:79) ==21439==by 0x832A54: zif_pfsockopen (fsock.c:130) ==21439==by 0x97C392: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320) ==21439==by 0x98092B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634) ==21439==by 0x97B84E: execute (zend_vm_execute.h:107) ==21439==by 0x947F26: zend_execute_scripts (zend.c:1194) ==21439==by 0x8D2DC2: php_execute_script (main.c:2275) ==21439==by 0xA2C00D: main (php_cli.c:1193) ... ==21439== Process terminating with default action of signal 11 (SIGSEGV) ==21439== Access not within mapped region at address 0x0 ==21439==at 0x8FE617: php_sockop_write (xp_socket.c:60) ==21439==by 0x8ED984: _php_stream_write_buffer (streams.c:981) ==21439==by 0x8EDCBC: _php_stream_write (streams.c:1092) ==21439==by 0x826C0A: zif_fwrite (file.c:1294) ==21439==by 0x97C392: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320) ==21439==by 0x98092B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634) ==21439==by 0x97B84E: execute (zend_vm_execute.h:107) ==21439==by 0x947F26: zend_execute_scripts (zend.c:1194) ==21439==by 0x8D2DC2: php_execute_script (main.c:2275) ==21439==by 0xA2C00D: main (php_cli.c:1193) ==21439== If you believe this happened as a result of a stack ==21439== overflow in your program's main thread (unlikely but ==21439== possible), you can try to increase the size of the ==21439== main thread stack using the --main-stacksize= flag. ==21439== The main thread stack size used in this run was 8388608. On 05/01/2011 07:57 AM, Gustavo André dos Santos Lopes wrote: cataphract Sun, 01 May 2011 03:57:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310681 Log: - Fixed bug #54623 (Segfault when when writing to a persistent socket after closing a copy of the socket). Bug: http://bugs.php.net/54623 (Assigned) Segmentation fault after writing to first socket after closing of second socket Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug54623.phpt U php/php-src/branches/PHP_5_3/main/streams/streams.c A php/php-src/trunk/ext/standard/tests/streams/bug54623.phpt U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-05-01 01:14:38 UTC (rev 310680) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-01 03:57:01 UTC (rev 310681) @@ -109,6 +109,10 @@ . Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator). (Felipe) +- Streams: + . Fixed bug #54623 (Segfault when when writing to a persistent socket after +closing a copy of the socket). (Gustavo) + 17 Mar 2011, PHP 5.3.6 - Upgraded bundled Sqlite3 to version 3.7.4. (Ilia) - Upgraded bundled PCRE to version 8.11. (Ilia) Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug54623.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug54623.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug54623.phpt 2011-05-01 03:57:01 UTC (rev 310681) @@ -0,0 +1,17 @@ +--TEST-- +Bug #54623: Segfault when when writing to a persistent socket after closing a copy of the socket +--FILE-- +?php +$sock = pfsockopen('udp://127.0.0.1', '63844'); +var_dump((int)$sock); +fwrite($sock, 1); +$sock2 = pfsockopen('udp://127.0.0.1', '63844'); +var_dump((int)$sock2); +fwrite($sock2, 2); +fclose($sock2); +fwrite($sock, 3); +--EXPECTF-- +int(%d) +int(%d) + +Warning: fwrite(): %d is not a valid stream resource in %s on line %d Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2011-05-01 01:14:38 UTC (rev 310680) +++
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS ext/spl/spl_directory.c ext/spl/spl_iterators.c ext/spl/tests/bug54384.phpt ext/spl/tests/iterator_031.phpt
2011/4/4 Gustavo André dos Santos Lopes cataphr...@php.net: cataphract Mon, 04 Apr 2011 02:50:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309929 Log: - Fixed bug #54384 (Dual iterators, GlobIterator, SplFileObject and SplTempFileObject crash when user-space classes don't call the paren constructor). Bug: http://bugs.php.net/54384 (Assigned) Several SPL classes crash when parent constructor is not called Uhm.. Whats the dealio with that new method? Is that really the best way to fix it? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS ext/spl/spl_directory.c ext/spl/spl_iterators.c ext/spl/tests/bug54384.phpt ext/spl/tests/iterator_031.phpt
On Mon, 25 Apr 2011 12:32:04 +0100, Hannes Magnusson hannes.magnus...@gmail.com wrote: 2011/4/4 Gustavo André dos Santos Lopes cataphr...@php.net: cataphract Mon, 04 Apr 2011 02:50:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309929 Log: - Fixed bug #54384 (Dual iterators, GlobIterator, SplFileObject and SplTempFileObject crash when user-space classes don't call the paren constructor). Bug: http://bugs.php.net/54384 (Assigned) Several SPL classes crash when parent constructor is not called Uhm.. Whats the dealio with that new method? Is that really the best way to fix it? The best way is always a weighted combination of several factors (BC impact, maintainability, consistency, effort, performance, etc.), and those weights are subjective. In case of this type of bug (userspace subclass doesn't call native super constructor), I used a constructor wrapper in trunk, which is, I think the best option because it executes the check only once and as soon as currently possible (when the object is created). However, this represents a BC break because userspace classes that used to call the super constructor at a later time will no longer work. So I went with another solution for 5.3. The dual iterators got a check on each object fetch from the store because that technique was already being used in spl_iterators.c. However, this technique is tedious and error prone because it requires a change in every instance method, so in spl_directory.c I used a centralized the check in the get_method handler; this technique was already used in SPL the difference is it would emit an error instead of causing an exception to be thrown. -- Gustavo Lopes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / php/php-src/branches/PHP_5_3/NEWS php/php-src/branches/PHP_5_3/configure.in php/php-src/branches/PHP_5_3/main/build-defs.h.in php/php-src/branches/PHP_5_3/main/main.c php/php-src/
On 04/18/11 11:50 AM, Hannes Magnusson wrote: Expose PHP_MANDIR Useful for apps (like the pear installer, phd, .. etc) to install their manpages into the same dir as php did :] Shouldn't that be done via php-config? johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / php/php-src/branches/PHP_5_3/NEWS php/php-src/branches/PHP_5_3/configure.in php/php-src/branches/PHP_5_3/main/build-defs.h.in php/php-src/branches/PHP_5_3/main/main.c php/php-src/
2011/4/18 Johannes Schlüter johan...@schlueters.de: On 04/18/11 11:50 AM, Hannes Magnusson wrote: Expose PHP_MANDIR Useful for apps (like the pear installer, phd, .. etc) to install their manpages into the same dir as php did :] Shouldn't that be done via php-config? Why? These are .php apps, I don't see why they should need to exec php-config. Besides, we already expose PHP_PREFIX, PHP_BINDIR, PHP_LIBDIR and all sorts of other similar constants.. except the mandir. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/string.c branches/PHP_5_3/ext/standard/tests/strings/bug54238.phpt trunk/ext/standard/string.c trunk/ext/standard/t
hi Stas, please add the CVE to the news entry. On Wed, Apr 13, 2011 at 8:32 AM, Stanislav Malyshev s...@php.net wrote: stas Wed, 13 Apr 2011 06:32:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310194 Log: fix bug #54238 (use-after-free in substr_replace()) Bug: http://bugs.php.net/54238 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/string.c A php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug54238.phpt U php/php-src/trunk/ext/standard/string.c A php/php-src/trunk/ext/standard/tests/strings/bug54238.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c
On 04/01/2011 03:47 AM, Pierre Joye wrote: Hi Tony, This commit breaks the build, see: Oh, sorry about that. For some reason I was 100% sure this structure is the same in HEAD, but apparently it isn't. -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c
Hi Tony, This commit breaks the build, see: http://windows.php.net/downloads/snaps/trunk-ts-windows-vc9-x86/logs/r309857/compile.txt Not sure yet why it fails. Does it work for you? On Thu, Mar 31, 2011 at 1:59 PM, Antony Dovgal tony2...@php.net wrote: tony2001 Thu, 31 Mar 2011 11:59:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309853 Log: fix bug #54423 (classes from dl()'ed extensions are not destroyed) Bug: http://bugs.php.net/54423 (Closed) classes from dl()'ed extensions are not destroyed Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-31 09:00:14 UTC (rev 309852) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-31 11:59:34 UTC (rev 309853) @@ -2,6 +2,8 @@ ||| ?? ??? 2011, PHP 5.3.7 - Zend Engine: + . Fixed bug #54423 (classes from dl()'ed extensions are not destroyed). + (Tony, Dmitry) . Fixed bug #54262 (Crash when assigning value to a dimension in a non-array). (Dmitry) Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-03-31 09:00:14 UTC (rev 309852) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-03-31 11:59:34 UTC (rev 309853) @@ -2082,6 +2082,22 @@ } /* }}} */ +static int clean_module_class(const zend_class_entry **ce, int *module_number TSRMLS_DC) /* {{{ */ +{ + if ((*ce)-type == ZEND_INTERNAL_CLASS (*ce)-module-module_number == *module_number) { + return ZEND_HASH_APPLY_REMOVE; + } else { + return ZEND_HASH_APPLY_KEEP; + } +} +/* }}} */ + +static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */ +{ + zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) clean_module_class, (void *) module_number TSRMLS_CC); +} +/* }}} */ + void module_destructor(zend_module_entry *module) /* {{{ */ { TSRMLS_FETCH(); @@ -2089,6 +2105,7 @@ if (module-type == MODULE_TEMPORARY) { zend_clean_module_rsrc_dtors(module-module_number TSRMLS_CC); clean_module_constants(module-module_number TSRMLS_CC); + clean_module_classes(module-module_number TSRMLS_CC); } if (module-module_started module-module_shutdown_func) { Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2011-03-31 09:00:14 UTC (rev 309852) +++ php/php-src/trunk/Zend/zend_API.c 2011-03-31 11:59:34 UTC (rev 309853) @@ -2208,6 +2208,22 @@ } /* }}} */ +static int clean_module_class(const zend_class_entry **ce, int *module_number TSRMLS_DC) /* {{{ */ +{ + if ((*ce)-type == ZEND_INTERNAL_CLASS (*ce)-module-module_number == *module_number) { + return ZEND_HASH_APPLY_REMOVE; + } else { + return ZEND_HASH_APPLY_KEEP; + } +} +/* }}} */ + +static void clean_module_classes(int module_number TSRMLS_DC) /* {{{ */ +{ + zend_hash_apply_with_argument(EG(class_table), (apply_func_arg_t) clean_module_class, (void *) module_number TSRMLS_CC); +} +/* }}} */ + void module_destructor(zend_module_entry *module) /* {{{ */ { TSRMLS_FETCH(); @@ -2215,6 +2231,7 @@ if (module-type == MODULE_TEMPORARY) { zend_clean_module_rsrc_dtors(module-module_number TSRMLS_CC); clean_module_constants(module-module_number TSRMLS_CC); + clean_module_classes(module-module_number TSRMLS_CC); } if (module-module_started module-module_shutdown_func) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS UPGRADING ext/spl/spl_directory.c ext/spl/tests/DirectoryIterator_getExtension_basic.phpt ext/spl/tests/SplFileInfo_getExtension_basic.phpt
hi, Please add it to UPGRADING too :) Cheers, On Fri, Feb 11, 2011 at 11:07 PM, Peter Cowburn sala...@php.net wrote: salathe Fri, 11 Feb 2011 22:07:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308264 Log: MFH - Added SplFileInfo::getExtension() (FR #48767) Bug: http://bugs.php.net/48767 (To be documented) SplFileInfo::getExtension() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/UPGRADING U php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c A php/php-src/branches/PHP_5_3/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt A php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_getExtension_basic.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-02-11 21:13:16 UTC (rev 308263) +++ php/php-src/branches/PHP_5_3/NEWS 2011-02-11 22:07:22 UTC (rev 308264) @@ -148,7 +148,8 @@ . Fixed bug #53914 (SPL assumes HAVE_GLOB is defined). (Chris Jones) . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values). (Felipe) - + . Added SplFileInfo::getExtension(). FR #48767. (Peter Cowburn) + - SQLite3 extension: . Fixed memory leaked introduced by the NULL poisoning patch. (Mateusz Kocielski, Pierre) Modified: php/php-src/branches/PHP_5_3/UPGRADING === --- php/php-src/branches/PHP_5_3/UPGRADING 2011-02-11 21:13:16 UTC (rev 308263) +++ php/php-src/branches/PHP_5_3/UPGRADING 2011-02-11 22:07:22 UTC (rev 308264) @@ -670,7 +670,9 @@ ReflectionClass::inNamespace() ReflectionClass::getNamespaceName() ReflectionClass::getShortName() - - SPL SplObjectStorage::addAll() + - SPL: DirectoryIterator::getExtension() + SplFileObject::getExtension() + SplObjectStorage::addAll() SplObjectStorage::removeAll() - XSL: XSLTProcessor::setProfiling() Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c 2011-02-11 21:13:16 UTC (rev 308263) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c 2011-02-11 22:07:22 UTC (rev 308264) @@ -849,6 +849,66 @@ } /* }}} */ +/* {{{ proto string SplFileInfo::getExtension() + Returns file extension component of path */ +SPL_METHOD(SplFileInfo, getExtension) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + char *fname, *p; + size_t flen; + int path_len, idx; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + spl_filesystem_object_get_path(intern, path_len TSRMLS_CC); + + if (path_len path_len intern-file_name_len) { + fname = intern-file_name + path_len + 1; + flen = intern-file_name_len - (path_len + 1); + } else { + fname = intern-file_name; + flen = intern-file_name_len; + } + + php_basename(fname, flen, NULL, 0, fname, flen TSRMLS_CC); + + p = zend_memrchr(fname, '.', flen); + if (p) { + idx = p - fname; + RETURN_STRINGL(fname + idx + 1, flen - idx - 1, 1); + } + + RETURN_EMPTY_STRING(); +} +/* }}}*/ + +/* {{{ proto string DirectoryIterator::getExtension() + Returns the file extension component of path */ +SPL_METHOD(DirectoryIterator, getExtension) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + char *fname, *p; + size_t flen; + int idx; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } + + php_basename(intern-u.dir.entry.d_name, strlen(intern-u.dir.entry.d_name), NULL, 0, fname, flen TSRMLS_CC); + + p = zend_memrchr(fname, '.', flen); + if (p) { + idx = p - fname; + RETURN_STRINGL(fname + idx + 1, flen - idx - 1, 1); + } + + RETURN_EMPTY_STRING(); +} +/* }}} */ + /* {{{ proto string SplFileInfo::getBasename([string $suffix]) U Returns filename component of path */ SPL_METHOD(SplFileInfo, getBasename) @@ -1786,6 +1846,7 @@ SPL_ME(SplFileInfo, __construct, arginfo_info___construct, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, getPath, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) SPL_ME(SplFileInfo, getFilename, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo,
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/json/JSON_parser.c trunk/ext/json/JSON_parser.c
Scott, Are there any tests for this? Chris On 02/09/2011 12:05 AM, Scott MacVicar wrote: scottmac Wed, 09 Feb 2011 08:05:00 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308155 Log: Fix Bug #53963, error code isn't always set in certain error cases. Bug: http://bugs.php.net/53963 (Assigned) Failed to decode, yet json_last_error() is JSON_ERROR_NONE Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/json/JSON_parser.c U php/php-src/trunk/ext/json/JSON_parser.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-02-09 00:34:12 UTC (rev 308154) +++ php/php-src/branches/PHP_5_3/NEWS 2011-02-09 08:05:00 UTC (rev 308155) @@ -75,6 +75,10 @@ . Implemented clone functionality for number, date message formatters. (Stas). +- JSON extension: + . Fixed bug #53963 (Ensure error_code is always set during some failed +decodings). (Scott) + - MySQL Improved extension: . Added 'db' and 'catalog' keys to the field fetching functions (FR #39847). (Kalle) Modified: php/php-src/branches/PHP_5_3/ext/json/JSON_parser.c === --- php/php-src/branches/PHP_5_3/ext/json/JSON_parser.c 2011-02-09 00:34:12 UTC (rev 308154) +++ php/php-src/branches/PHP_5_3/ext/json/JSON_parser.c 2011-02-09 08:05:00 UTC (rev 308155) @@ -656,6 +656,7 @@ /* fall through if not IS_STRING */ default: FREE_BUFFERS(); +jp-error_code = PHP_JSON_ERROR_SYNTAX; return false; } break; @@ -695,6 +696,7 @@ break; default: FREE_BUFFERS(); +jp-error_code = PHP_JSON_ERROR_SYNTAX; return false; } buf.len = 0; Modified: php/php-src/trunk/ext/json/JSON_parser.c === --- php/php-src/trunk/ext/json/JSON_parser.c2011-02-09 00:34:12 UTC (rev 308154) +++ php/php-src/trunk/ext/json/JSON_parser.c2011-02-09 08:05:00 UTC (rev 308155) @@ -673,6 +673,7 @@ /* fall through if not IS_STRING */ default: FREE_BUFFERS(); +jp-error_code = PHP_JSON_ERROR_SYNTAX; return false; } break; @@ -712,6 +713,7 @@ break; default: FREE_BUFFERS(); +jp-error_code = PHP_JSON_ERROR_SYNTAX; return false; } buf.len = 0; -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/serialize/precision.phpt branches/PHP_5_3/main/main.c trunk/ext/standard/tests/serialize/precision.phpt trunk
On 02/08/2011 01:40 PM, Gustavo André dos Santos Lopes wrote: cataphract Tue, 08 Feb 2011 21:40:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308150 Log: - Changed default serialize_precision from 100 to 17, as discussed in internals. Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/serialize/precision.phpt U php/php-src/branches/PHP_5_3/main/main.c A php/php-src/trunk/ext/standard/tests/serialize/precision.phpt U php/php-src/trunk/main/main.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-02-08 21:19:23 UTC (rev 308149) +++ php/php-src/branches/PHP_5_3/NEWS 2011-02-08 21:40:51 UTC (rev 308150) @@ -16,6 +16,8 @@ - Core: . Added ability to connect to HTTPS sites through proxy with basic authentication using stream_context/http/header/Proxy-Authorization (Dmitry) + . Changed default value of ini directive serialize_precision from 100 to 17. +(Gustavo) . Fixed bug #53959 (reflection data for fgetcsv out-of-date). (Richard) . Fixed bug #53577 (Regression introduced in 5.3.4 in open_basedir with a trailing forward slash). (lekensteyn at gmail dot com, Pierre) Gustavo, Can you update php.ini-* too - and ideally also update the doc? Try using edit.php.net. Thanks, Chris -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/serialize/precision.phpt branches/PHP_5_3/main/main.c trunk/ext/standard/tests/serialize/precision.phpt trunk
On Wed, 09 Feb 2011 00:05:39 -, Christopher Jones christopher.jo...@oracle.com wrote: Can you update php.ini-* too - and ideally also update the doc? Try using edit.php.net. Done. Thanks for bringing this to my attention. -- Gustavo Lopes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/tests/015.phpt branches/PHP_5_3/ext/standard/url.c trunk/ext/filter/tests/015.phpt trunk/ext/standard/url.c
Missing news entry from a previous bug fix. On Fri, Feb 4, 2011 at 10:37 PM, Adam Harvey ahar...@php.net wrote: On 5 February 2011 05:41, Ilia Alshanetsky il...@php.net wrote: Log: Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number). Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-02-04 19:22:43 UTC (rev 308034) +++ php/php-src/branches/PHP_5_3/NEWS 2011-02-04 21:41:15 UTC (rev 308035) @@ -109,6 +111,8 @@ - Phar extension: . Fixed bug #53541 (format string bug in ext/phar). (crrodriguez at opensuse dot org, Ilia) + . Fixed bug #53898 (PHAR reports invalid error message, when the directory + does not exist). (Ilia) I suspect that NEWS item was meant to be for another commit. :) Adam -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/tests/015.phpt branches/PHP_5_3/ext/standard/url.c trunk/ext/filter/tests/015.phpt trunk/ext/standard/url.c
On 5 February 2011 05:41, Ilia Alshanetsky il...@php.net wrote: Log: Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number). Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-02-04 19:22:43 UTC (rev 308034) +++ php/php-src/branches/PHP_5_3/NEWS 2011-02-04 21:41:15 UTC (rev 308035) @@ -109,6 +111,8 @@ - Phar extension: . Fixed bug #53541 (format string bug in ext/phar). (crrodriguez at opensuse dot org, Ilia) + . Fixed bug #53898 (PHAR reports invalid error message, when the directory + does not exist). (Ilia) I suspect that NEWS item was meant to be for another commit. :) Adam -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/fpm/fpm_php.c branches/PHP_5_3/sapi/fpm/fpm/fpm_php.h branches/PHP_5_3/sapi/fpm/fpm/fpm_request.c branches/PHP_5_3/sapi
On 01/29/2011 02:38 PM, Jérôme Loyet wrote: + if (request_uri) { + cpystrn(slot-request_uri, request_uri, sizeof(slot-request_uri)); + } + No need to use/have private string funcs for that, we have strlcpy() strlcat() in PHP. See main/strlcpy.c and main/strlcat.c. -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/fpm/fpm_php.c branches/PHP_5_3/sapi/fpm/fpm/fpm_php.h branches/PHP_5_3/sapi/fpm/fpm/fpm_request.c branches/PHP_5_3/sapi
2011/1/30 Antony Dovgal t...@daylessday.org: On 01/29/2011 02:38 PM, Jérôme Loyet wrote: + if (request_uri) { + cpystrn(slot-request_uri, request_uri, sizeof(slot-request_uri)); + } + No need to use/have private string funcs for that, we have strlcpy() strlcat() in PHP. See main/strlcpy.c and main/strlcat.c. I replaced cpystrn with strlcpy in FPM. See revision 307861 thanks you -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/fpm/fpm_php.c branches/PHP_5_3/sapi/fpm/fpm/fpm_php.h branches/PHP_5_3/sapi/fpm/fpm/fpm_request.c branches/PHP_5_3/sapi
On 01/30/2011 04:52 PM, Jérôme Loyet wrote: 2011/1/30 Antony Dovgal t...@daylessday.org: On 01/29/2011 02:38 PM, Jérôme Loyet wrote: + if (request_uri) { + cpystrn(slot-request_uri, request_uri, sizeof(slot-request_uri)); + } + No need to use/have private string funcs for that, we have strlcpy() strlcat() in PHP. See main/strlcpy.c and main/strlcat.c. I replaced cpystrn with strlcpy in FPM. See revision 307861 Thanks! -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/php_zip.c branches/PHP_5_3/ext/zip/tests/bug53854.phpt trunk/UPGRADING trunk/ext/zip/php_zip.c trunk/ext/zip/tests/bug53
Hi, On Fri, 2011-01-28 at 04:19 +, Adam Harvey wrote: Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-01-28 04:17:08 UTC (rev 307806) +++ php/php-src/trunk/UPGRADING 2011-01-28 04:19:40 UTC (rev 307807) @@ -371,7 +371,12 @@ i. New class constants - - + - ZipArchive::CM_BZIP2 + - ZipArchive::CM_LZ77 + - ZipArchive::CM_LZMA + - ZipArchive::CM_PPMD + - ZipArchive::CM_TERSE + - ZipArchive::CM_WAVPACK j. New Hash algorithms Why are you adding these in trunk/UPGRADING when they are also in 5.3 and will appear there first? johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/php_zip.c branches/PHP_5_3/ext/zip/tests/bug53854.phpt trunk/UPGRADING trunk/ext/zip/php_zip.c trunk/ext/zip/tests/bug53
2011/1/28 Johannes Schlüter johan...@schlueters.de: On Fri, 2011-01-28 at 04:19 +, Adam Harvey wrote: Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-01-28 04:17:08 UTC (rev 307806) +++ php/php-src/trunk/UPGRADING 2011-01-28 04:19:40 UTC (rev 307807) @@ -371,7 +371,12 @@ i. New class constants - - + - ZipArchive::CM_BZIP2 + - ZipArchive::CM_LZ77 + - ZipArchive::CM_LZMA + - ZipArchive::CM_PPMD + - ZipArchive::CM_TERSE + - ZipArchive::CM_WAVPACK j. New Hash algorithms Why are you adding these in trunk/UPGRADING when they are also in 5.3 and will appear there first? Rank idiocy combined with sleep deprivation. Thanks. :) Adam -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/readline/readline.c trunk/ext/readline/readline.c
Hi Ilia, What about adding a phpt? Chris On 01/10/2011 10:19 AM, Ilia Alshanetsky wrote: iliaaMon, 10 Jan 2011 18:19:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307343 Log: Fixed bug #53630 (Fixed parameter handling inside readline() function). Bug: http://bugs.php.net/53630 (Verified) optional prompt argument is treated as non-optional Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/readline/readline.c U php/php-src/trunk/ext/readline/readline.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-10 18:19:02 UTC (rev 307343) @@ -76,6 +76,10 @@ - PHP-FPM SAPI: . Fixed bug #53527 (php-fpm --test doesn't set a valuable return value). (fat) +- Readline extension: + . Fixed bug #53630 (Fixed parameter handling inside readline() function). +(jo at feuersee dot de, Ilia) + - SOAP extension: . Fixed possible crash introduced by the NULL poisoning patch. (Mateusz Kocielski, Pierre) Modified: php/php-src/branches/PHP_5_3/ext/readline/readline.c === --- php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/branches/PHP_5_3/ext/readline/readline.c2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!,prompt,prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!,prompt,prompt_len)) { RETURN_FALSE; } Modified: php/php-src/trunk/ext/readline/readline.c === --- php/php-src/trunk/ext/readline/readline.c 2011-01-10 17:34:26 UTC (rev 307342) +++ php/php-src/trunk/ext/readline/readline.c 2011-01-10 18:19:02 UTC (rev 307343) @@ -196,7 +196,7 @@ int prompt_len; char *result; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s!,prompt,prompt_len)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!,prompt,prompt_len)) { RETURN_FALSE; } -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysql/tests/bug53649.phpt branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt branch
On 01/07/2011 05:22 PM, Andrey Hristov wrote: A php/php-src/branches/PHP_5_3/ext/mysql/tests/bug53649.phpt Is this test supposed to fail? # cat /local/qa/5_3_non-ZTS/ext/mysql/tests/bug53649.diff 001+ bug 001- done -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_heap.c branches/PHP_5_3/ext/spl/tests/bug53588.phpt trunk/ext/spl/spl_heap.c trunk/ext/spl/tests/bug53588.phpt
Hi Gustavo, Can you review the definition of http://www.php.net/manual/en/splminheap.compare.php ? I believe the testcase should have the operands reversed to satisfy this definition and so the bug was bogus. Chris On 12/21/2010 09:29 AM, Gustavo André dos Santos Lopes wrote: cataphract Tue, 21 Dec 2010 17:29:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306542 Log: - Fixed bug #53588 (SplMinHeap bad sorting with custom compare function). Bug: http://bugs.php.net/53588 (Assigned) SplMinHeap bad insert sort Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_heap.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug53588.phpt U php/php-src/trunk/ext/spl/spl_heap.c A php/php-src/trunk/ext/spl/tests/bug53588.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-21 16:05:40 UTC (rev 306541) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-21 17:29:14 UTC (rev 306542) @@ -70,6 +70,8 @@ - SPL extension: . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values). (Felipe) + . Fixed bug #53588 (SplMinHeap bad sorting with custom compare function). +(Gustavo) - SQLite extension: . Fixed memory leaked introduced by the NULL poisoning patch (Mateusz Kocielski, Pierre) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_heap.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_heap.c 2010-12-21 16:05:40 UTC (rev 306541) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_heap.c 2010-12-21 17:29:14 UTC (rev 306542) @@ -176,7 +176,7 @@ spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object((zval *)object TSRMLS_CC); if (heap_object-fptr_cmp) { long lval = 0; - if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)a, (zval *)b,lval TSRMLS_CC) == FAILURE) { + if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)b, (zval *)a,lval TSRMLS_CC) == FAILURE) { /* exception or call failure */ return 0; } Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug53588.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug53588.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug53588.phpt2010-12-21 17:29:14 UTC (rev 306542) @@ -0,0 +1,23 @@ +--TEST-- +Bug #53588 (SplMinHeap bad sorting with custom compare function) +--FILE-- +?php +class MySimpleHeap extends SplMinHeap{ +public function compare( $value1, $value2 ){ +return ( $value1 - $value2 ); +} +} + +$obj = new MySimpleHeap(); +$obj-insert( 8 ); +$obj-insert( 0 ); +$obj-insert( 4 ); + +foreach( $obj as $number ) { +echo $number, \n; +} +--EXPECT-- +0 +4 +8 + Modified: php/php-src/trunk/ext/spl/spl_heap.c === --- php/php-src/trunk/ext/spl/spl_heap.c2010-12-21 16:05:40 UTC (rev 306541) +++ php/php-src/trunk/ext/spl/spl_heap.c2010-12-21 17:29:14 UTC (rev 306542) @@ -176,7 +176,7 @@ spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object((zval *)object TSRMLS_CC); if (heap_object-fptr_cmp) { long lval = 0; - if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)a, (zval *)b,lval TSRMLS_CC) == FAILURE) { + if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)b, (zval *)a,lval TSRMLS_CC) == FAILURE) { /* exception or call failure */ return 0; } Added: php/php-src/trunk/ext/spl/tests/bug53588.phpt === --- php/php-src/trunk/ext/spl/tests/bug53588.phpt (rev 0) +++ php/php-src/trunk/ext/spl/tests/bug53588.phpt 2010-12-21 17:29:14 UTC (rev 306542) @@ -0,0 +1,23 @@ +--TEST-- +Bug #53588 (SplMinHeap bad sorting with custom compare function) +--FILE-- +?php +class MySimpleHeap extends SplMinHeap{ +public function compare( $value1, $value2 ){ +return ( $value1 - $value2 ); +} +} + +$obj = new MySimpleHeap(); +$obj-insert( 8 ); +$obj-insert( 0 ); +$obj-insert( 4 ); + +foreach( $obj as $number ) { +echo $number, \n; +} +--EXPECT-- +0 +4 +8 + -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_heap.c branches/PHP_5_3/ext/spl/tests/bug53588.phpt trunk/ext/spl/spl_heap.c trunk/ext/spl/tests/bug53588.phpt
On 12/21/2010 10:47 AM, Gustavo Lopes wrote: On Tue, 21 Dec 2010 18:23:11 -, Christopher Jones christopher.jo...@oracle.com wrote: Hi Gustavo, Can you review the definition of http://www.php.net/manual/en/splminheap.compare.php ? I believe the testcase should have the operands reversed to satisfy this definition and so the bug was bogus. I did. The definition says compare() should give a positive number if $value1 is larger than $value2, which it does: That's the definition for SplMaxHeap. The definition for SplMinHeap is positive integer if value1 is lower than value2. See the link above. Chris +?php +class MySimpleHeap extends SplMinHeap{ + public function compare( $value1, $value2 ){ + return ( $value1 - $value2 ); + } +} + +$obj = new MySimpleHeap(); +$obj-insert( 8 ); +$obj-insert( 0 ); +$obj-insert( 4 ); + +foreach( $obj as $number ) { + echo $number, \n; +} +--EXPECT-- +0 +4 +8 + So this implementation of compare() gives the usual order and SplMinHeap should give the elements in the usual increasing order (the top should have the smallest). Moreover, without the change extending SplMinHeap or SplMaxHeap would give the same result. -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_heap.c branches/PHP_5_3/ext/spl/tests/bug53588.phpt trunk/ext/spl/spl_heap.c trunk/ext/spl/tests/bug53588.phpt
On Tue, 21 Dec 2010 18:23:11 -, Christopher Jones christopher.jo...@oracle.com wrote: Hi Gustavo, Can you review the definition of http://www.php.net/manual/en/splminheap.compare.php ? I believe the testcase should have the operands reversed to satisfy this definition and so the bug was bogus. I did. The definition says compare() should give a positive number if $value1 is larger than $value2, which it does: +?php +class MySimpleHeap extends SplMinHeap{ +public function compare( $value1, $value2 ){ +return ( $value1 - $value2 ); +} +} + +$obj = new MySimpleHeap(); +$obj-insert( 8 ); +$obj-insert( 0 ); +$obj-insert( 4 ); + +foreach( $obj as $number ) { +echo $number, \n; +} +--EXPECT-- +0 +4 +8 + So this implementation of compare() gives the usual order and SplMinHeap should give the elements in the usual increasing order (the top should have the smallest). Moreover, without the change extending SplMinHeap or SplMaxHeap would give the same result. -- Gustavo Lopes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_heap.c branches/PHP_5_3/ext/spl/tests/bug53588.phpt trunk/ext/spl/spl_heap.c trunk/ext/spl/tests/bug53588.phpt
On Tue, 21 Dec 2010 18:52:07 -, Christopher Jones christopher.jo...@oracle.com wrote: On 12/21/2010 10:47 AM, Gustavo Lopes wrote: On Tue, 21 Dec 2010 18:23:11 -, Christopher Jones christopher.jo...@oracle.com wrote: Hi Gustavo, Can you review the definition of http://www.php.net/manual/en/splminheap.compare.php ? I believe the testcase should have the operands reversed to satisfy this definition and so the bug was bogus. I did. The definition says compare() should give a positive number if $value1 is larger than $value2, which it does: That's the definition for SplMaxHeap. The definition for SplMinHeap is positive integer if value1 is lower than value2. See the link above. Oops. You're right. I've reversed the change and closed the bug as bogus. Thanks. -- Gustavo Lopes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/lib/zip_dirent.c trunk/ext/zip/lib/zip_dirent.c
Hi 2010/12/18 Gustavo André dos Santos Lopes cataphr...@php.net: Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c U php/php-src/trunk/ext/zip/lib/zip_dirent.c I think that fix should go upstream instead of have a .patch file like ext/fileinfo does it to patch php-src specific changes until its fixed. Pierre? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/lib/zip_dirent.c trunk/ext/zip/lib/zip_dirent.c
2010/12/18 Kalle Sommer Nielsen ka...@php.net: Hi 2010/12/18 Gustavo André dos Santos Lopes cataphr...@php.net: Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c U php/php-src/trunk/ext/zip/lib/zip_dirent.c I think that fix should go upstream instead of have a .patch file like ext/fileinfo does it to patch php-src specific changes until its fixed. Where do you see a patch file? That's fine to patch it. There are already fixes here not present upstream due to too few or too slow releases. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/zip_stream.c trunk/ext/zip/zip_stream.c
On Wed, Nov 3, 2010 at 22:48, Pierre Joye paj...@php.net wrote: pajoye Wed, 03 Nov 2010 21:48:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305063 Log: - add stat support for zip:// does that mean filesize(zip://archive.zip#foobar) and file_exists(zip://archive.zip#foobar) and buddies work now? Got very frustrated yesterday when I noticed it didn't work :P -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/gd/gd.c trunk/ext/gd/gd.c
What about 5.2? On Wed, Dec 8, 2010 at 3:45 AM, Pierre Joye paj...@php.net wrote: pajoye Wed, 08 Dec 2010 08:45:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306075 Log: - Fix #53492, fix crash if aa steps are invalid Bug: http://bugs.php.net/53492 (Assigned) Stack buffer overflow in imagepstext Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/gd/gd.c U php/php-src/trunk/ext/gd/gd.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-08 08:20:44 UTC (rev 306074) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-08 08:45:56 UTC (rev 306075) @@ -207,7 +207,10 @@ and trailing :: in the filter extension). (Gustavo) . Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4 addresses and ::). (Gustavo) - + +- GD extension: + . Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre) + - GMP extension: . Fixed bug #52906 (gmp_mod returns negative result when non-negative is expected). (Stas) Modified: php/php-src/branches/PHP_5_3/ext/gd/gd.c === --- php/php-src/branches/PHP_5_3/ext/gd/gd.c 2010-12-08 08:20:44 UTC (rev 306074) +++ php/php-src/branches/PHP_5_3/ext/gd/gd.c 2010-12-08 08:45:56 UTC (rev 306075) @@ -4228,6 +4228,11 @@ return; } + if (aa_steps != 4 || aa_steps != 16) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, AA steps must be 4 or 16); + RETURN_FALSE; + } + ZEND_FETCH_RESOURCE(bg_img, gdImagePtr, img, -1, Image, le_gd); ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, Type 1 font, le_ps_font); Modified: php/php-src/trunk/ext/gd/gd.c === --- php/php-src/trunk/ext/gd/gd.c 2010-12-08 08:20:44 UTC (rev 306074) +++ php/php-src/trunk/ext/gd/gd.c 2010-12-08 08:45:56 UTC (rev 306075) @@ -4290,6 +4290,11 @@ return; } + if (aa_steps != 4 || aa_steps != 16) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, AA steps must be 4 or 16); + RETURN_FALSE; + } + ZEND_FETCH_RESOURCE(bg_img, gdImagePtr, img, -1, Image, le_gd); ZEND_FETCH_RESOURCE(f_ind, int *, fnt, -1, Type 1 font, le_ps_font); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php