[PHP-CVS] com php-src: basic fixes to ext/hash: ext/hash/hash.c ext/hash/hash_haval.c ext/hash/hash_joaat.c ext/hash/hash_md.c ext/hash/hash_ripemd.c ext/hash/hash_sha.c ext/hash/php_hash.h ext/hash/p
Commit:81158446748d3153c5defe479b3083601d366d03 Author:Anatol Belski a...@php.net Wed, 27 Nov 2013 10:33:08 +0100 Parents: 0336763311e0d4ad44ac47b88f4e39ecd8503247 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=81158446748d3153c5defe479b3083601d366d03 Log: basic fixes to ext/hash Changed paths: M ext/hash/hash.c M ext/hash/hash_haval.c M ext/hash/hash_joaat.c M ext/hash/hash_md.c M ext/hash/hash_ripemd.c M ext/hash/hash_sha.c M ext/hash/php_hash.h M ext/hash/php_hash_haval.h M ext/hash/php_hash_joaat.h M ext/hash/php_hash_md.h M ext/hash/php_hash_ripemd.h M ext/hash/php_hash_sha.h diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 87f19c5..b4d48ff 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -86,7 +86,7 @@ static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_ALGOS] = { /* Hash Registry Access */ -PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_len) /* {{{ */ +PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, zend_str_size_int algo_len) /* {{{ */ { php_hash_ops *ops; char *lower = estrndup(algo, algo_len); @@ -103,7 +103,7 @@ PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_l PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops) /* {{{ */ { - int algo_len = strlen(algo); + zend_str_size_int algo_len = strlen(algo); char *lower = estrndup(algo, algo_len); zend_str_tolower(lower, algo_len); @@ -126,13 +126,13 @@ PHP_HASH_API int php_hash_copy(const void *ops, void *orig_context, void *dest_c static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_bool raw_output_default) /* {{{ */ { char *algo, *data, *digest; - int algo_len, data_len; + zend_str_size_int algo_len, data_len; zend_bool raw_output = raw_output_default; const php_hash_ops *ops; void *context; php_stream *stream = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|b, algo, algo_len, data, data_len, raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, SS|b, algo, algo_len, data, data_len, raw_output) == FAILURE) { return; } @@ -203,21 +203,21 @@ PHP_FUNCTION(hash_file) } /* }}} */ -static inline void php_hash_string_xor_char(unsigned char *out, const unsigned char *in, const unsigned char xor_with, const int length) { - int i; +static inline void php_hash_string_xor_char(unsigned char *out, const unsigned char *in, const unsigned char xor_with, const zend_str_size_int length) { + zend_str_size_int i; for (i=0; i length; i++) { out[i] = in[i] ^ xor_with; } } -static inline void php_hash_string_xor(unsigned char *out, const unsigned char *in, const unsigned char *xor_with, const int length) { - int i; +static inline void php_hash_string_xor(unsigned char *out, const unsigned char *in, const unsigned char *xor_with, const zend_str_size_int length) { + zend_str_size_int i; for (i=0; i length; i++) { out[i] = in[i] ^ xor_with[i]; } } -static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context, const unsigned char *key, const int key_len) { +static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context, const unsigned char *key, const zend_str_size_int key_len) { memset(K, 0, ops-block_size); if (key_len ops-block_size) { /* Reduce the key first */ @@ -231,7 +231,7 @@ static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops * php_hash_string_xor_char(K, K, 0x36, ops-block_size); } -static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context, const unsigned char *key, const unsigned char *data, const long data_size) { +static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context, const unsigned char *key, const unsigned char *data, const php_int_t data_size) { ops-hash_init(context); ops-hash_update(context, key, ops-block_size); ops-hash_update(context, data, data_size); @@ -241,13 +241,13 @@ static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_bool raw_output_default) /* {{{ */ { char *algo, *data, *digest, *key, *K; - int algo_len, data_len, key_len; + zend_str_size_int algo_len, data_len, key_len; zend_bool raw_output = raw_output_default; const php_hash_ops *ops; void *context; php_stream *stream = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sss|b, algo,
[PHP-CVS] com php-src: fix function definition: Zend/zend_virtual_cwd.c
Commit:bec270ffc877815e9feffd80eecf9f807f6d6c89 Author:Anatol Belski a...@php.net Wed, 27 Nov 2013 04:58:57 -0800 Parents: b9c19f5d74acefe1697816c8babef420499f0a14 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bec270ffc877815e9feffd80eecf9f807f6d6c89 Log: fix function definition Changed paths: M Zend/zend_virtual_cwd.c Diff: diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 1fe6f1d..0b60a74 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -750,7 +750,7 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, zend_ } /* }}} */ -CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */ +CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, zend_str_size_int path_len, time_t t TSRMLS_DC) /* {{{ */ { return realpath_cache_find(path, path_len, t TSRMLS_CC); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: 5.4.23 rc1: NEWS configure.in main/php_version.h
Commit:7202bed1f2ba8c171d78f6a1a1889372cc02bdc7 Author:Stanislav Malyshev s...@php.net Wed, 27 Nov 2013 00:06:19 -0800 Parents: 0aadab0e2eb101953ceb60b63f6ac157f7e03b03 Branches: PHP-5.4.23 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7202bed1f2ba8c171d78f6a1a1889372cc02bdc7 Log: 5.4.23 rc1 Changed paths: M NEWS M configure.in M main/php_version.h Diff: diff --git a/NEWS b/NEWS index 5c58f91..334bb09 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHPNEWS ||| -?? ??? 2013, PHP 5.4.23 +28 Nov 2013, PHP 5.4.23 RC1 - Core: . Fixed bug #66094 (unregister_tick_function tries to cast a Closure to a @@ -24,7 +24,7 @@ PHP NEWS - PDO . Fixed bug 65946 (sql_parser permanently converts values bound to strings) -?? ??? 2013, PHP 5.4.22 +14 Nov 2013, PHP 5.4.22 - Core: . Fixed bug #65911 (scope resolution operator - strange behavior with $this). diff --git a/configure.in b/configure.in index af2de7f..e0c2c3d 100644 --- a/configure.in +++ b/configure.in @@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=4 PHP_RELEASE_VERSION=23 -PHP_EXTRA_VERSION=-dev +PHP_EXTRA_VERSION=RC1 PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 523bda6..12eb7c3 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 4 #define PHP_RELEASE_VERSION 23 -#define PHP_EXTRA_VERSION -dev -#define PHP_VERSION 5.4.23-dev +#define PHP_EXTRA_VERSION RC1 +#define PHP_VERSION 5.4.23RC1 #define PHP_VERSION_ID 50423 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: 5.4.24-dev now: NEWS configure.in main/php_version.h
Commit:63f3ff7b5f89f50eb9df76c3d0860c04cc6e0f66 Author:Stanislav Malyshev s...@php.net Wed, 27 Nov 2013 00:13:45 -0800 Parents: 0aadab0e2eb101953ceb60b63f6ac157f7e03b03 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=63f3ff7b5f89f50eb9df76c3d0860c04cc6e0f66 Log: 5.4.24-dev now Changed paths: M NEWS M configure.in M main/php_version.h Diff: diff --git a/NEWS b/NEWS index 5c58f91..2514027 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ PHPNEWS ||| +?? ??? 2013, PHP 5.4.24 + ?? ??? 2013, PHP 5.4.23 - Core: @@ -24,7 +26,7 @@ PHP NEWS - PDO . Fixed bug 65946 (sql_parser permanently converts values bound to strings) -?? ??? 2013, PHP 5.4.22 +14 Nov 2013, PHP 5.4.22 - Core: . Fixed bug #65911 (scope resolution operator - strange behavior with $this). diff --git a/configure.in b/configure.in index af2de7f..8a6e9d7 100644 --- a/configure.in +++ b/configure.in @@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...); PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=4 -PHP_RELEASE_VERSION=23 +PHP_RELEASE_VERSION=24 PHP_EXTRA_VERSION=-dev PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 523bda6..89fb515 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 4 -#define PHP_RELEASE_VERSION 23 +#define PHP_RELEASE_VERSION 24 #define PHP_EXTRA_VERSION -dev -#define PHP_VERSION 5.4.23-dev -#define PHP_VERSION_ID 50423 +#define PHP_VERSION 5.4.24-dev +#define PHP_VERSION_ID 50424 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #65969 (Chain assignment with T_LIST failure): NEWS Zend/tests/bug65969.phpt Zend/zend_execute.c Zend/zend_vm_def.h Zend/zend_vm_execute.h
Commit:16d59aa1718324ff0d4bea62fa9dfc3d4c8b16ce Author:Dmitry Stogov dmi...@zend.com Wed, 27 Nov 2013 14:26:34 +0400 Parents: 63f3ff7b5f89f50eb9df76c3d0860c04cc6e0f66 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=16d59aa1718324ff0d4bea62fa9dfc3d4c8b16ce Log: Fixed bug #65969 (Chain assignment with T_LIST failure) Bugs: https://bugs.php.net/65969 Changed paths: M NEWS A Zend/tests/bug65969.phpt M Zend/zend_execute.c M Zend/zend_vm_def.h M Zend/zend_vm_execute.h diff --git a/NEWS b/NEWS index 2514027..ac57315 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ PHP NEWS - Core: . Fixed bug #66094 (unregister_tick_function tries to cast a Closure to a string). (Laruence) + . Fixed bug #65969 (Chain assignment with T_LIST failure). (Dmitry) . Fixed bug #65947 (basename is no more working after fgetcsv in certain situation). (Laruence) diff --git a/Zend/tests/bug65969.phpt b/Zend/tests/bug65969.phpt new file mode 100644 index 000..d512832 --- /dev/null +++ b/Zend/tests/bug65969.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #65969 (Chain assignment with T_LIST failure) +--FILE-- +?php +$obj = new stdClass; +list($a,$b) = $obj-prop = [1,2]; +var_dump($a,$b); +--EXPECT-- +int(1) +int(2) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index ff9c2d0..0b6aff2 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1248,9 +1248,8 @@ convert_to_array: } } -static void zend_fetch_dimension_address_read(temp_variable *result, zval **container_ptr, zval *dim, int dim_type, int type TSRMLS_DC) +static void zend_fetch_dimension_address_read(temp_variable *result, zval *container, zval *dim, int dim_type, int type TSRMLS_DC) { - zval *container = *container_ptr; zval **retval; switch (Z_TYPE_P(container)) { diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index f6c6e6a..b28cd51 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1166,19 +1166,17 @@ ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TMP|VAR|CV) { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; + zval *container; SAVE_OPLINE(); - if ((opline-extended_value ZEND_FETCH_ADD_LOCK) - OP1_TYPE != IS_CV - EX_T(opline-op1.var).var.ptr_ptr) { - PZVAL_LOCK(*EX_T(opline-op1.var).var.ptr_ptr); + if (OP1_TYPE == IS_VAR (opline-extended_value ZEND_FETCH_ADD_LOCK)) { + PZVAL_LOCK(EX_T(opline-op1.var).var.ptr); } - container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R); + container = GET_OP1_ZVAL_PTR(BP_VAR_R); zend_fetch_dimension_address_read(EX_T(opline-result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC); FREE_OP2(); - FREE_OP1_VAR_PTR(); + FREE_OP1(); CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -1243,13 +1241,13 @@ ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, VAR|CV, CONST|TMP|VAR|CV) { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; + zval *container; SAVE_OPLINE(); - container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_IS); + container = GET_OP1_ZVAL_PTR(BP_VAR_IS); zend_fetch_dimension_address_read(EX_T(opline-result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_IS TSRMLS_CC); FREE_OP2(); - FREE_OP1_VAR_PTR(); + FREE_OP1(); CHECK_EXCEPTION(); ZEND_VM_NEXT_OPCODE(); } @@ -1258,12 +1256,12 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV) { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; SAVE_OPLINE(); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline-extended_value ZEND_FETCH_ARG_MASK))) { - container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W); + zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W); + if (OP1_TYPE == IS_VAR UNEXPECTED(container == NULL)) { zend_error_noreturn(E_ERROR, Cannot use string offset as an array); } @@ -1271,15 +1269,19 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV) if (OP1_TYPE == IS_VAR OP1_FREE READY_TO_DESTROY(free_op1.var)) { EXTRACT_ZVAL_PTR(EX_T(opline-result.var)); } + FREE_OP2(); + FREE_OP1_VAR_PTR(); } else { + zval *container; + if (OP2_TYPE == IS_UNUSED) { zend_error_noreturn(E_ERROR, Cannot use [] for reading); } - container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R); + container = GET_OP1_ZVAL_PTR(BP_VAR_R); zend_fetch_dimension_address_read(EX_T(opline-result.var), container,