[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/Zend/zend_vm_def.h trunk/Zend/zend_vm_execute.h
dmitry Mon, 07 Dec 2009 08:14:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291807 Log: Fixed bug #50351 (performance regression handling objects, ten times slower in 5.3 than in 5.2. foreach statement should not initiate GC) Bug: http://bugs.php.net/50351 (Assigned) performance regression handling objects, ten times slower in 5.3 than in 5.2 Changed paths: U php/php-src/branches/PHP_5_3/NEWS 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/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-12-07 08:10:06 UTC (rev 291806) +++ php/php-src/branches/PHP_5_3/NEWS 2009-12-07 08:14:48 UTC (rev 291807) @@ -30,6 +30,8 @@ - Fixed memory leak in extension loading when an error occurs on Windows. (Pierre) +- Fixed bug #50351 (performance regression handling objects, ten times slower + in 5.3 than in 5.2). (Dmitry) - Fixed bug #50345 (nanosleep not detected properly on some solaris versions). (Jani) - Fixed bug #50340 (php.ini parser does not allow spaces in ini keys). (Jani) Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-12-07 08:10:06 UTC (rev 291806) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-12-07 08:14:48 UTC (rev 291807) @@ -3691,7 +3691,7 @@ { zend_op *opline = EX(opline); zend_free_op free_op1; - zval *array = GET_OP1_ZVAL_PTR(BP_VAR_R); + zval *array = EX_T(opline-op1.u.var).var.ptr; zval **value; char *str_key; uint str_key_len; @@ -3701,8 +3701,6 @@ int key_type = 0; zend_bool use_key = (zend_bool)(opline-extended_value ZEND_FE_FETCH_WITH_KEY); - PZVAL_LOCK(array); - switch (zend_iterator_unwrap(array, iter TSRMLS_CC)) { default: case ZEND_ITER_INVALID: Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-12-07 08:10:06 UTC (rev 291806) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-12-07 08:14:48 UTC (rev 291807) @@ -8851,8 +8851,8 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - zend_free_op free_op1; - zval *array = _get_zval_ptr_var(opline-op1, EX(Ts), free_op1 TSRMLS_CC); + + zval *array = EX_T(opline-op1.u.var).var.ptr; zval **value; char *str_key; uint str_key_len; @@ -8862,8 +8862,6 @@ int key_type = 0; zend_bool use_key = (zend_bool)(opline-extended_value ZEND_FE_FETCH_WITH_KEY); - PZVAL_LOCK(array); - switch (zend_iterator_unwrap(array, iter TSRMLS_CC)) { default: case ZEND_ITER_INVALID: Modified: php/php-src/trunk/Zend/zend_vm_def.h === --- php/php-src/trunk/Zend/zend_vm_def.h2009-12-07 08:10:06 UTC (rev 291806) +++ php/php-src/trunk/Zend/zend_vm_def.h2009-12-07 08:14:48 UTC (rev 291807) @@ -3861,7 +3861,7 @@ { zend_op *opline = EX(opline); zend_free_op free_op1; - zval *array = GET_OP1_ZVAL_PTR(BP_VAR_R); + zval *array = EX_T(opline-op1.u.var).var.ptr; zval **value; zstr str_key; uint str_key_len; @@ -3871,8 +3871,6 @@ int key_type = 0; zend_bool use_key = (zend_bool)(opline-extended_value ZEND_FE_FETCH_WITH_KEY); - PZVAL_LOCK(array); - switch (zend_iterator_unwrap(array, iter TSRMLS_CC)) { default: case ZEND_ITER_INVALID: Modified: php/php-src/trunk/Zend/zend_vm_execute.h === --- php/php-src/trunk/Zend/zend_vm_execute.h2009-12-07 08:10:06 UTC (rev 291806) +++ php/php-src/trunk/Zend/zend_vm_execute.h2009-12-07 08:14:48 UTC (rev 291807) @@ -9199,8 +9199,8 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - zend_free_op free_op1; - zval *array = _get_zval_ptr_var(opline-op1, EX(Ts), free_op1 TSRMLS_CC); + + zval *array = EX_T(opline-op1.u.var).var.ptr; zval **value; zstr str_key; uint str_key_len; @@ -9210,8 +9210,6 @@ int key_type = 0; zend_bool use_key = (zend_bool)(opline-extended_value ZEND_FE_FETCH_WITH_KEY); - PZVAL_LOCK(array); - switch (zend_iterator_unwrap(array, iter TSRMLS_CC)) {
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug49866.phpt branches/PHP_5_3/Zend/zend_vm_def.h branches/PHP_5_3/Zend/zend_vm_execute.h trunk/Zend/tests/bug49866.phpt
dmitry Mon, 07 Dec 2009 08:47:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291810 Log: Fixed bug #49866 (Making reference on string offsets crashes PHP) Bug: http://bugs.php.net/49866 (Assigned) Making reference on string offsets crashes PHP Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug49866.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 A php/php-src/trunk/Zend/tests/bug49866.phpt U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-12-07 08:18:24 UTC (rev 291809) +++ php/php-src/branches/PHP_5_3/NEWS 2009-12-07 08:47:18 UTC (rev 291810) @@ -88,6 +88,7 @@ - Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option()). (Pierrick) - Fixed bug #49921 (Curl post upload functions changed). (Ilia) +- Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry) - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). Added: php/php-src/branches/PHP_5_3/Zend/tests/bug49866.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug49866.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug49866.phpt 2009-12-07 08:47:18 UTC (rev 291810) @@ -0,0 +1,10 @@ +--TEST-- +Bug #49866 (Making reference on string offsets crashes PHP) +--FILE-- +?php +$a = string; +$b = $a[1]; +$b = f; +echo $a; +--EXPECTF-- +Fatal error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php on line 3 Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-12-07 08:18:24 UTC (rev 291809) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-12-07 08:47:18 UTC (rev 291810) @@ -1100,7 +1100,7 @@ FREE_OP1_VAR_PTR(); /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline-result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-12-07 08:18:24 UTC (rev 291809) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-12-07 08:47:18 UTC (rev 291810) @@ -9864,7 +9864,7 @@ if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline-result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); @@ -11667,7 +11667,7 @@ if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline-result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); @@ -13416,7 +13416,7 @@ if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline-result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); @@ -14756,7 +14756,7 @@ if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline-result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline-result.u.var).var.ptr_ptr); @@ -15807,7 +15807,7 @@ if (free_op1.var) {zval_ptr_dtor(free_op1.var);}; /* We are going to assign the result by reference */ - if (opline-extended_value) { + if (opline-extended_value EX_T(opline-result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline-result.u.var).var.ptr_ptr);
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/ fastcgi.c
tony2001 Mon, 07 Dec 2009 10:17:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291811 Log: add missing FPM-specific code Changed paths: U php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c === --- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c 2009-12-07 08:47:18 UTC (rev 291810) +++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c 2009-12-07 10:17:16 UTC (rev 291811) @@ -922,6 +922,7 @@ close(req-fd); #endif req-fd = -1; + fpm_request_finished(); } } @@ -968,6 +969,8 @@ sa_t sa; socklen_t len = sizeof(sa); + fpm_request_accepting(); + FCGI_LOCK(req-listen_socket); req-fd = accept(listen_socket, (struct sockaddr *)sa, len); FCGI_UNLOCK(req-listen_socket); @@ -1007,6 +1010,8 @@ struct pollfd fds; int ret; + fpm_request_reading_headers(); + fds.fd = req-fd; fds.events = POLLIN; fds.revents = 0; @@ -1019,6 +1024,8 @@ } fcgi_close(req, 1, 0); #else + fpm_request_reading_headers(); + if (req-fd FD_SETSIZE) { struct timeval tv = {5,0}; fd_set set; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/filter.c branches/PHP_5_3/ext/filter/filter_private.h branches/PHP_5_3/ext/filter/sanitizing_filters.c trunk/ext/filter/f
iliaaMon, 07 Dec 2009 13:43:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291818 Log: Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/filter/filter.c U php/php-src/branches/PHP_5_3/ext/filter/filter_private.h U php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c U php/php-src/trunk/ext/filter/filter.c U php/php-src/trunk/ext/filter/filter_private.h U php/php-src/trunk/ext/filter/sanitizing_filters.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/branches/PHP_5_3/NEWS 2009-12-07 13:43:44 UTC (rev 291818) @@ -9,6 +9,7 @@ - Changed post_max_size php.ini directive to allow unlimited post size by setting it to 0. (Rasmus) +- Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia) - Added protection for $_SESSION from interrupt corruption and improved session.save_path check. (Stas) - Added LIBXML_PARSEHUGE constant to override the maximum text size of a Modified: php/php-src/branches/PHP_5_3/ext/filter/filter.c === --- php/php-src/branches/PHP_5_3/ext/filter/filter.c2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/branches/PHP_5_3/ext/filter/filter.c2009-12-07 13:43:44 UTC (rev 291818) @@ -251,6 +251,7 @@ REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_LOW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_STRIP_HIGH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_BACKTICK, FILTER_FLAG_STRIP_BACKTICK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_LOW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_HIGH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_AMP, FILTER_FLAG_ENCODE_AMP, CONST_CS | CONST_PERSISTENT); Modified: php/php-src/branches/PHP_5_3/ext/filter/filter_private.h === --- php/php-src/branches/PHP_5_3/ext/filter/filter_private.h2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/branches/PHP_5_3/ext/filter/filter_private.h2009-12-07 13:43:44 UTC (rev 291818) @@ -39,6 +39,7 @@ #define FILTER_FLAG_ENCODE_AMP 0x0040 #define FILTER_FLAG_NO_ENCODE_QUOTES0x0080 #define FILTER_FLAG_EMPTY_STRING_NULL 0x0100 +#define FILTER_FLAG_STRIP_BACKTICK 0x0200 #define FILTER_FLAG_ALLOW_FRACTION 0x1000 #define FILTER_FLAG_ALLOW_THOUSAND 0x2000 Modified: php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c === --- php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c 2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c 2009-12-07 13:43:44 UTC (rev 291818) @@ -123,6 +123,7 @@ for (i = 0; i Z_STRLEN_P(value); i++) { if ((str[i] 127) (flags FILTER_FLAG_STRIP_HIGH)) { } else if ((str[i] 32) (flags FILTER_FLAG_STRIP_LOW)) { + } else if ((str[i] == '`') (flags FILTER_FLAG_STRIP_BACKTICK)) { } else { buf[c] = str[i]; ++c; Modified: php/php-src/trunk/ext/filter/filter.c === --- php/php-src/trunk/ext/filter/filter.c 2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/trunk/ext/filter/filter.c 2009-12-07 13:43:44 UTC (rev 291818) @@ -251,6 +251,7 @@ REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_LOW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_STRIP_HIGH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(FILTER_FLAG_STRIP_BACKTICK, FILTER_FLAG_STRIP_BACKTICK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_LOW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_HIGH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_ENCODE_AMP, FILTER_FLAG_ENCODE_AMP, CONST_CS | CONST_PERSISTENT); Modified: php/php-src/trunk/ext/filter/filter_private.h === --- php/php-src/trunk/ext/filter/filter_private.h 2009-12-07 12:42:00 UTC (rev 291817) +++ php/php-src/trunk/ext/filter/filter_private.h 2009-12-07 13:43:44 UTC (rev 291818) @@ -39,6 +39,7
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/filter.c branches/PHP_5_3/ext/filter/filter_private.h branches/PHP_5_3/ext/filter/sanitizing_filters.c trunk/ext/fi
hi, On Mon, Dec 7, 2009 at 2:43 PM, Ilia Alshanetsky il...@php.net wrote: iliaa Mon, 07 Dec 2009 13:43:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291818 Log: Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. Nice addition, thanks :) Can you add/modify a test for this case please? So it won't be broken by the next fix :) Cheers, -- Pierre 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] svn: /php/php-src/ branches/PHP_5_2/ext/standard/html.c branches/PHP_5_2/ext/standard/tests/strings/bug49785.phpt branches/PHP_5_3/ext/standard/html.c branches/PHP_5_3/ext/standard/tests/str
moriyoshiMon, 07 Dec 2009 15:41:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291821 Log: - Take account of surrogate pairs. Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/html.c U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug49785.phpt U php/php-src/branches/PHP_5_3/ext/standard/html.c U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug49785.phpt U php/php-src/trunk/ext/standard/html.c U php/php-src/trunk/ext/standard/tests/strings/bug49785.phpt Modified: php/php-src/branches/PHP_5_2/ext/standard/html.c === --- php/php-src/branches/PHP_5_2/ext/standard/html.c2009-12-07 15:34:13 UTC (rev 291820) +++ php/php-src/branches/PHP_5_2/ext/standard/html.c2009-12-07 15:41:43 UTC (rev 291821) @@ -566,6 +566,8 @@ this_char = ((c 0x0f) 12) | ((str[pos + 1] 0x3f) 6) | (str[pos + 2] 0x3f); if (this_char 0x800) { MB_FAILURE(pos); + } else if (this_char = 0xd800 this_char = 0xdfff) { + MB_FAILURE(pos); } MB_WRITE((unsigned char)c); MB_WRITE((unsigned char)str[pos + 1]); Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug49785.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug49785.phpt 2009-12-07 15:34:13 UTC (rev 291820) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug49785.phpt 2009-12-07 15:41:43 UTC (rev 291821) @@ -36,10 +36,14 @@ var_dump(_bin2hex(htmlentities(\xf8\x88\x80\x80\x80, ENT_QUOTES, UTF-8))); echo --\n; -// UTF-8: alternative (invalid) UTF-8 sequence +// UTF-8: alternative (invalid) UTF-8 sequence / surrogate pairs var_dump(_bin2hex(htmlspecialchars(\xc0\xa6, ENT_QUOTES, 'UTF-8'))); var_dump(_bin2hex(htmlspecialchars(\xe0\x80\xa6, ENT_QUOTES, 'UTF-8'))); var_dump(_bin2hex(htmlspecialchars(\xf0\x80\x80\xa6, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xec\xbf\xbf, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xed\xa0\x80, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xed\xbf\xbf, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xee\x80\x80, ENT_QUOTES, 'UTF-8'))); // Shift_JIS: non-lead byte = 0x80 var_dump(_bin2hex(htmlspecialchars(\x80, ENT_QUOTES, 'Shift_JIS'))); @@ -158,6 +162,10 @@ string(0) string(0) string(0) +string(6) ecbfbf +string(0) +string(0) +string(6) ee8080 string(2) 80 string(2) a0 string(2) a1 Modified: php/php-src/branches/PHP_5_3/ext/standard/html.c === --- php/php-src/branches/PHP_5_3/ext/standard/html.c2009-12-07 15:34:13 UTC (rev 291820) +++ php/php-src/branches/PHP_5_3/ext/standard/html.c2009-12-07 15:41:43 UTC (rev 291821) @@ -565,6 +565,8 @@ this_char = ((c 0x0f) 12) | ((str[pos + 1] 0x3f) 6) | (str[pos + 2] 0x3f); if (this_char 0x800) { MB_FAILURE(pos); + } else if (this_char = 0xd800 this_char = 0xdfff) { + MB_FAILURE(pos); } MB_WRITE((unsigned char)c); MB_WRITE((unsigned char)str[pos + 1]); Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug49785.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug49785.phpt 2009-12-07 15:34:13 UTC (rev 291820) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug49785.phpt 2009-12-07 15:41:43 UTC (rev 291821) @@ -42,10 +42,14 @@ var_dump(_bin2hex(htmlentities(\xf0\x80\x80\x80\xf0\x90\x80\x80, ENT_QUOTES | ENT_IGNORE, UTF-8))); echo --\n; -// UTF-8: alternative (invalid) UTF-8 sequence +// UTF-8: alternative (invalid) UTF-8 sequence / surrogate pairs var_dump(_bin2hex(htmlspecialchars(\xc0\xa6, ENT_QUOTES, 'UTF-8'))); var_dump(_bin2hex(htmlspecialchars(\xe0\x80\xa6, ENT_QUOTES, 'UTF-8'))); var_dump(_bin2hex(htmlspecialchars(\xf0\x80\x80\xa6, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xec\xbf\xbf, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xed\xa0\x80, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xed\xbf\xbf, ENT_QUOTES, 'UTF-8'))); +var_dump(_bin2hex(htmlspecialchars(\xee\x80\x80, ENT_QUOTES, 'UTF-8'))); //
[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS
srinatar Mon, 07 Dec 2009 20:13:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291832 Log: - Fix NEWS (48752 not relevant for 5.2 release) Changed paths: U php/php-src/branches/PHP_5_2/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-12-07 19:43:39 UTC (rev 291831) +++ php/php-src/branches/PHP_5_2/NEWS 2009-12-07 20:13:16 UTC (rev 291832) @@ -101,7 +101,6 @@ (Moriyoshi, hello at iwamot dot com) - Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded applications). (Ilia, Florian Anderiasch) -- Fixed bug #48752 (Crash during date parsing with invalid date). (Pierre) - Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes). (Sriram Natarajan) - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_5_3/ex
stas Tue, 08 Dec 2009 01:35:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291846 Log: add realpath cache inspect functions Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/branches/PHP_5_3/ext/standard/php_filestat.h A php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/filestat.c U php/php-src/trunk/ext/standard/php_filestat.h A php/php-src/trunk/ext/standard/tests/file/realpath_cache.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-12-08 00:25:15 UTC (rev 291845) +++ php/php-src/branches/PHP_5_3/NEWS 2009-12-08 01:35:08 UTC (rev 291846) @@ -21,6 +21,7 @@ - Added support for CURLOPT_CERTINFO. FR #49253. (Linus Nielsen Feltzing li...@haxx.se) - Added client-side server name indication support in openssl. (Arnaud) +- Added realpath_cache_size() and realpath_cache_get(). (Stas) - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas) Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c 2009-12-08 00:25:15 UTC (rev 291845) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c 2009-12-08 01:35:08 UTC (rev 291846) @@ -590,6 +590,22 @@ } /* }}} */ +CWD_API int realpath_cache_size() +{ + return CWDG(realpath_cache_size); +} + +CWD_API int realpath_cache_max_buckets() +{ + return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0])); +} + +CWD_API realpath_cache_bucket** realpath_cache_get_buckets() +{ + return CWDG(realpath_cache); +} + + #undef LINK_MAX #define LINK_MAX 32 Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h 2009-12-08 00:25:15 UTC (rev 291845) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h 2009-12-08 01:35:08 UTC (rev 291846) @@ -238,6 +238,9 @@ CWD_API void realpath_cache_clean(TSRMLS_D); CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC); CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC); +CWD_API int realpath_cache_size(); +CWD_API int realpath_cache_max_buckets(); +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(); /* The actual macros to be used in programs using TSRM * If the program defines VIRTUAL_DIR it will use the Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2009-12-08 00:25:15 UTC (rev 291845) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2009-12-08 01:35:08 UTC (rev 291846) @@ -1301,6 +1301,12 @@ ZEND_ARG_INFO(0, filename) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_size, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_realpath_cache_get, 0) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_fileperms, 0) ZEND_ARG_INFO(0, filename) ZEND_END_ARG_INFO() @@ -3198,6 +3204,8 @@ PHP_FE(disk_total_space,arginfo_disk_total_space) PHP_FE(disk_free_space, arginfo_disk_free_space) PHP_FALIAS(diskfreespace, disk_free_space, arginfo_disk_free_space) + PHP_FE(realpath_cache_size,arginfo_realpath_cache_size) + PHP_FE(realpath_cache_get,arginfo_realpath_cache_get) /* functions from mail.c */ PHP_FE(mail, arginfo_mail) Modified: php/php-src/branches/PHP_5_3/ext/standard/filestat.c === --- php/php-src/branches/PHP_5_3/ext/standard/filestat.c 2009-12-08 00:25:15 UTC (rev 291845) +++ php/php-src/branches/PHP_5_3/ext/standard/filestat.c 2009-12-08 01:35:08 UTC (rev 291846) @@ -1107,6 +1107,44 @@ FileFunction(php_if_stat, FS_STAT) /* }}} */ +/* {{{ proto bool realpath_cache_size() + Get current size of realpath cache */ +PHP_FUNCTION(realpath_cache_size) +{ + RETURN_LONG(realpath_cache_size()); +} + +/* {{{ proto bool realpath_cache_get() + Get current size of realpath cache */ +PHP_FUNCTION(realpath_cache_get) +{ + realpath_cache_bucket **buckets = realpath_cache_get_buckets(), **end = buckets + realpath_cache_max_buckets(); + + array_init(return_value); +
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_
Hi 2009/12/8 Stanislav Malyshev s...@php.net: stas Tue, 08 Dec 2009 01:35:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291846 Log: add realpath cache inspect functions You forgot to add the parameter parsing to the functions, for functions with no parameters we use the zend_parse_parameters_none() macro. -- regrads, 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] svn: /php/php-src/ branches/PHP_5_3/ext/standard/filestat.c trunk/ext/standard/filestat.c
stas Tue, 08 Dec 2009 01:44:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291847 Log: add no params check Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/trunk/ext/standard/filestat.c Modified: php/php-src/branches/PHP_5_3/ext/standard/filestat.c === --- php/php-src/branches/PHP_5_3/ext/standard/filestat.c2009-12-08 01:35:08 UTC (rev 291846) +++ php/php-src/branches/PHP_5_3/ext/standard/filestat.c2009-12-08 01:44:15 UTC (rev 291847) @@ -,6 +,9 @@ Get current size of realpath cache */ PHP_FUNCTION(realpath_cache_size) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } RETURN_LONG(realpath_cache_size()); } @@ -1120,6 +1123,10 @@ { realpath_cache_bucket **buckets = realpath_cache_get_buckets(), **end = buckets + realpath_cache_max_buckets(); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + array_init(return_value); while(buckets end) { realpath_cache_bucket *bucket = *buckets; Modified: php/php-src/trunk/ext/standard/filestat.c === --- php/php-src/trunk/ext/standard/filestat.c 2009-12-08 01:35:08 UTC (rev 291846) +++ php/php-src/trunk/ext/standard/filestat.c 2009-12-08 01:44:15 UTC (rev 291847) @@ -1208,6 +1208,9 @@ Get current size of realpath cache */ PHP_FUNCTION(realpath_cache_size) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } RETURN_LONG(realpath_cache_size()); } @@ -1217,6 +1220,10 @@ { realpath_cache_bucket **buckets = realpath_cache_get_buckets(), **end = buckets + realpath_cache_max_buckets(); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + array_init(return_value); while(buckets end) { realpath_cache_bucket *bucket = *buckets; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h trunk/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.h
felipe Tue, 08 Dec 2009 01:51:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291848 Log: - Fixed ZTS build Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2009-12-08 01:44:15 UTC (rev 291847) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2009-12-08 01:51:34 UTC (rev 291848) @@ -590,17 +590,17 @@ } /* }}} */ -CWD_API int realpath_cache_size() +CWD_API int realpath_cache_size(TSRMLS_D) { return CWDG(realpath_cache_size); } -CWD_API int realpath_cache_max_buckets() +CWD_API int realpath_cache_max_buckets(TSRMLS_D) { return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0])); } -CWD_API realpath_cache_bucket** realpath_cache_get_buckets() +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D) { return CWDG(realpath_cache); } Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2009-12-08 01:44:15 UTC (rev 291847) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2009-12-08 01:51:34 UTC (rev 291848) @@ -238,9 +238,9 @@ CWD_API void realpath_cache_clean(TSRMLS_D); CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC); CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC); -CWD_API int realpath_cache_size(); -CWD_API int realpath_cache_max_buckets(); -CWD_API realpath_cache_bucket** realpath_cache_get_buckets(); +CWD_API int realpath_cache_size(TSRMLS_D); +CWD_API int realpath_cache_max_buckets(TSRMLS_D); +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D); /* The actual macros to be used in programs using TSRM * If the program defines VIRTUAL_DIR it will use the Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2009-12-08 01:44:15 UTC (rev 291847) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2009-12-08 01:51:34 UTC (rev 291848) @@ -590,17 +590,17 @@ } /* }}} */ -CWD_API int realpath_cache_size() +CWD_API int realpath_cache_size(TSRMLS_D) { return CWDG(realpath_cache_size); } -CWD_API int realpath_cache_max_buckets() +CWD_API int realpath_cache_max_buckets(TSRMLS_D) { return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0])); } -CWD_API realpath_cache_bucket** realpath_cache_get_buckets() +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D) { return CWDG(realpath_cache); } Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.h === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2009-12-08 01:44:15 UTC (rev 291847) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2009-12-08 01:51:34 UTC (rev 291848) @@ -255,9 +255,9 @@ CWD_API void realpath_cache_clean(TSRMLS_D); CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC); CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC); -CWD_API int realpath_cache_size(); -CWD_API int realpath_cache_max_buckets(); -CWD_API realpath_cache_bucket** realpath_cache_get_buckets(); +CWD_API int realpath_cache_size(TSRMLS_D); +CWD_API int realpath_cache_max_buckets(TSRMLS_D); +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D); /* The actual macros to be used in programs using TSRM * If the program defines VIRTUAL_DIR it will use the -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt branches/PHP_5_3/ext/standard/tests/file/realpath_cache_win32.phpt trunk/ext/standard/tests/file/realpath_cach
stas Tue, 08 Dec 2009 01:52:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291849 Log: win32 should have different test Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache_win32.phpt U php/php-src/trunk/ext/standard/tests/file/realpath_cache.phpt A php/php-src/trunk/ext/standard/tests/file/realpath_cache_win32.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt 2009-12-08 01:51:34 UTC (rev 291848) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache.phpt 2009-12-08 01:52:57 UTC (rev 291849) @@ -1,5 +1,11 @@ --TEST-- realpath_cache_size() and realpath_cache_get() +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +die('skip not on Windows'); +} +? --FILE-- ?php Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache_win32.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache_win32.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/realpath_cache_win32.phpt 2009-12-08 01:52:57 UTC (rev 291849) @@ -0,0 +1,38 @@ +--TEST-- +realpath_cache_size() and realpath_cache_get() +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) != 'WIN') { +die('skip only on Windows'); +} +? +--FILE-- +?php + +var_dump(realpath_cache_size()); +$data = realpath_cache_get(); +var_dump($data[__DIR__]); + +echo Done\n; +? +--EXPECTF-- +int(%d) +array(8) { + [key]= + int(%d) + [is_dir]= + bool(true) + [realpath]= + string(%d) %sfile + [expires]= + int(%d) + [is_rvalid]= + bool(%s) + [is_wvalid]= + bool(%s) + [is_readable]= + bool(%s) + [is_writable]= + bool(%s) +} +Done Modified: php/php-src/trunk/ext/standard/tests/file/realpath_cache.phpt === --- php/php-src/trunk/ext/standard/tests/file/realpath_cache.phpt 2009-12-08 01:51:34 UTC (rev 291848) +++ php/php-src/trunk/ext/standard/tests/file/realpath_cache.phpt 2009-12-08 01:52:57 UTC (rev 291849) @@ -1,5 +1,11 @@ --TEST-- realpath_cache_size() and realpath_cache_get() +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +die('skip not on Windows'); +} +? --FILE-- ?php Added: php/php-src/trunk/ext/standard/tests/file/realpath_cache_win32.phpt === --- php/php-src/trunk/ext/standard/tests/file/realpath_cache_win32.phpt (rev 0) +++ php/php-src/trunk/ext/standard/tests/file/realpath_cache_win32.phpt 2009-12-08 01:52:57 UTC (rev 291849) @@ -0,0 +1,38 @@ +--TEST-- +realpath_cache_size() and realpath_cache_get() +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) != 'WIN') { +die('skip only on Windows'); +} +? +--FILE-- +?php + +var_dump(realpath_cache_size()); +$data = realpath_cache_get(); +var_dump($data[__DIR__]); + +echo Done\n; +? +--EXPECTF-- +int(%d) +array(8) { + [key]= + int(%d) + [is_dir]= + bool(true) + [realpath]= + string(%d) %sfile + [expires]= + int(%d) + [is_rvalid]= + bool(%s) + [is_wvalid]= + bool(%s) + [is_readable]= + bool(%s) + [is_writable]= + bool(%s) +} +Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/filestat.c trunk/ext/standard/filestat.c
stas Tue, 08 Dec 2009 01:57:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291850 Log: ouch, that ZTS Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/trunk/ext/standard/filestat.c Modified: php/php-src/branches/PHP_5_3/ext/standard/filestat.c === --- php/php-src/branches/PHP_5_3/ext/standard/filestat.c2009-12-08 01:52:57 UTC (rev 291849) +++ php/php-src/branches/PHP_5_3/ext/standard/filestat.c2009-12-08 01:57:16 UTC (rev 291850) @@ -1114,14 +1114,14 @@ if (zend_parse_parameters_none() == FAILURE) { return; } - RETURN_LONG(realpath_cache_size()); + RETURN_LONG(realpath_cache_size(TSRMLS_C)); } /* {{{ proto bool realpath_cache_get() Get current size of realpath cache */ PHP_FUNCTION(realpath_cache_get) { - realpath_cache_bucket **buckets = realpath_cache_get_buckets(), **end = buckets + realpath_cache_max_buckets(); + realpath_cache_bucket **buckets = realpath_cache_get_buckets(TSRMLS_C), **end = buckets + realpath_cache_max_buckets(TSRMLS_C); if (zend_parse_parameters_none() == FAILURE) { return; Modified: php/php-src/trunk/ext/standard/filestat.c === --- php/php-src/trunk/ext/standard/filestat.c 2009-12-08 01:52:57 UTC (rev 291849) +++ php/php-src/trunk/ext/standard/filestat.c 2009-12-08 01:57:16 UTC (rev 291850) @@ -1211,14 +1211,14 @@ if (zend_parse_parameters_none() == FAILURE) { return; } - RETURN_LONG(realpath_cache_size()); + RETURN_LONG(realpath_cache_size(TSRMLS_C)); } /* {{{ proto bool realpath_cache_get() Get current size of realpath cache */ PHP_FUNCTION(realpath_cache_get) { - realpath_cache_bucket **buckets = realpath_cache_get_buckets(), **end = buckets + realpath_cache_max_buckets(); + realpath_cache_bucket **buckets = realpath_cache_get_buckets(TSRMLS_C), **end = buckets + realpath_cache_max_buckets(TSRMLS_C); if (zend_parse_parameters_none() == FAILURE) { return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend.h branches/PHP_5_3/ext/filter/filter.c branches/PHP_5_3/ext/pcre/php_pcre.c branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_3/ext/pdo_sqlite/
felipe Tue, 08 Dec 2009 01:57:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291851 Log: - Added MAKE_COPY_ZVAL(ppzv, pzv) macro Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend.h U php/php-src/branches/PHP_5_3/ext/filter/filter.c U php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c U php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c U php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c U php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c U php/php-src/branches/PHP_5_3/ext/soap/soap.c U php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/branches/PHP_5_3/ext/standard/array.c U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c U php/php-src/branches/PHP_5_3/ext/standard/string.c U php/php-src/branches/PHP_5_3/ext/xml/xml.c U php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c U php/php-src/trunk/Zend/zend.h U php/php-src/trunk/ext/filter/filter.c U php/php-src/trunk/ext/pcre/php_pcre.c U php/php-src/trunk/ext/pdo/pdo_stmt.c U php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c U php/php-src/trunk/ext/reflection/php_reflection.c U php/php-src/trunk/ext/soap/soap.c U php/php-src/trunk/ext/spl/spl_iterators.c U php/php-src/trunk/ext/sqlite3/sqlite3.c U php/php-src/trunk/ext/standard/array.c U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/string.c U php/php-src/trunk/ext/xml/xml.c U php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c Modified: php/php-src/branches/PHP_5_3/Zend/zend.h === --- php/php-src/branches/PHP_5_3/Zend/zend.h 2009-12-08 01:57:16 UTC (rev 291850) +++ php/php-src/branches/PHP_5_3/Zend/zend.h 2009-12-08 01:57:37 UTC (rev 291851) @@ -710,6 +710,11 @@ FREE_ZVAL(pzv); \ } \ INIT_PZVAL((zv)); + +#define MAKE_COPY_ZVAL(ppzv, pzv) \ + *(pzv) = **(ppzv);\ + zval_copy_ctor((pzv));\ + INIT_PZVAL((pzv)); #define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \ int is_ref, refcount; \ Modified: php/php-src/branches/PHP_5_3/ext/filter/filter.c === --- php/php-src/branches/PHP_5_3/ext/filter/filter.c 2009-12-08 01:57:16 UTC (rev 291850) +++ php/php-src/branches/PHP_5_3/ext/filter/filter.c 2009-12-08 01:57:37 UTC (rev 291851) @@ -392,9 +392,7 @@ ) { zval **tmp; if (zend_hash_find(HASH_OF(options), default, sizeof(default), (void **)tmp) == SUCCESS) { - **value = **tmp; - zval_copy_ctor(*value); - INIT_PZVAL(*value); + MAKE_COPY_ZVAL(tmp, *value); } } } @@ -679,9 +677,7 @@ zval *tmp; ALLOC_ZVAL(tmp); - *tmp = **filtered; - zval_copy_ctor(tmp); - INIT_PZVAL(tmp); + MAKE_COPY_ZVAL(filtered, tmp); zval_dtor(*filtered); @@ -701,15 +697,11 @@ if (!op) { zval_dtor(return_value); - *return_value = *input; - zval_copy_ctor(return_value); - INIT_PZVAL(return_value); + MAKE_COPY_ZVAL(input, return_value); php_filter_call(return_value, FILTER_DEFAULT, NULL, 0, FILTER_REQUIRE_ARRAY TSRMLS_CC); } else if (Z_TYPE_PP(op) == IS_LONG) { zval_dtor(return_value); - *return_value = *input; - zval_copy_ctor(return_value); - INIT_PZVAL(return_value); + MAKE_COPY_ZVAL(input, return_value); php_filter_call(return_value, Z_LVAL_PP(op), NULL, 0, FILTER_REQUIRE_ARRAY TSRMLS_CC); } else if (Z_TYPE_PP(op) == IS_ARRAY) { array_init(return_value); @@ -735,9 +727,7 @@ zval *nval; ALLOC_ZVAL(nval); -*nval = **tmp; -zval_copy_ctor(nval); -INIT_PZVAL(nval); +MAKE_COPY_ZVAL(tmp, nval); php_filter_call(nval, -1, arg_elm, 0, FILTER_REQUIRE_SCALAR TSRMLS_CC); add_assoc_zval_ex(return_value, arg_key, arg_key_len, nval); @@ -783,9 +773,7 @@ Z_TYPE_PP(opt) == IS_ARRAY zend_hash_find(HASH_OF(*opt), default, sizeof(default), (void **)def) == SUCCESS ) { -*return_value = **def; -zval_copy_ctor(return_value); -INIT_PZVAL(return_value); +MAKE_COPY_ZVAL(def, return_value); return; } } @@ -796,9 +784,7 @@ } } - *return_value = **tmp; - zval_copy_ctor(return_value); /* Watch out for empty strings */ - INIT_PZVAL(return_value); + MAKE_COPY_ZVAL(tmp, return_value); php_filter_call(return_value, filter, filter_args, 1, FILTER_REQUIRE_SCALAR TSRMLS_CC); } @@ -820,9 +806,7 @@ RETURN_FALSE; } - *return_value = *data; - zval_copy_ctor(data); - INIT_PZVAL(return_value); + MAKE_COPY_ZVAL(data, return_value); php_filter_call(return_value, filter, filter_args, 1, FILTER_REQUIRE_SCALAR TSRMLS_CC); } Modified:
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
jani Tue, 08 Dec 2009 06:19:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291860 Log: FIFO 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 2009-12-08 05:47:40 UTC (rev 291859) +++ php/php-src/branches/PHP_5_3/NEWS 2009-12-08 06:19:56 UTC (rev 291860) @@ -9,6 +9,7 @@ - Changed post_max_size php.ini directive to allow unlimited post size by setting it to 0. (Rasmus) +- Added realpath_cache_size() and realpath_cache_get() functions. (Stas) - Added FILTER_FLAG_STRIP_BACKTICK option to the filter extension. (Ilia) - Added protection for $_SESSION from interrupt corruption and improved session.save_path check. (Stas) @@ -21,7 +22,6 @@ - Added support for CURLOPT_CERTINFO. FR #49253. (Linus Nielsen Feltzing li...@haxx.se) - Added client-side server name indication support in openssl. (Arnaud) -- Added realpath_cache_size() and realpath_cache_get(). (Stas) - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php