[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_API.c
Commit:f0cb67402f2bcd3dc310cf938dfce799ccec7c7b Author:Xinchen Hui larue...@php.net Thu, 29 Aug 2013 14:01:54 +0800 Parents: bd677b43a78ebc0779ed64781172225d15b35671 72027cd0848f1a5c580c601573448cdea9b095ca Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f0cb67402f2bcd3dc310cf938dfce799ccec7c7b Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM Zend/zend_API.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #65579 (Using traits with get_class_methods causes segfault).: NEWS Zend/tests/bug65579.phpt Zend/zend_API.c
Commit:72027cd0848f1a5c580c601573448cdea9b095ca Author:Adam Harvey ahar...@php.net Wed, 28 Aug 2013 20:33:42 -0700 Parents: 3745bdadc03a146fd37a3528658abc86bc8494df Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=72027cd0848f1a5c580c601573448cdea9b095ca Log: Fix bug #65579 (Using traits with get_class_methods causes segfault). Specifically, this checks if there are trait aliases defined in the class scope before attempting to dereference the first trait alias. This handles the case where a trait alias was used in a child trait but no aliases exist in the concrete class. Bugs: https://bugs.php.net/65579 Changed paths: M NEWS A Zend/tests/bug65579.phpt M Zend/zend_API.c Diff: diff --git a/NEWS b/NEWS index 093fa20..b718a74 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2013, PHP 5.4.20 - Core: + . Fixed bug #65579 (Using traits with get_class_methods causes segfault). +(Adam) . Fixed bug #65490 (Duplicate calls to get lineno filename for DTRACE_FUNCTION_*). (Chris Jones) . Fixed bug #65483 (quoted-printable encode stream filter incorrectly encoding diff --git a/Zend/tests/bug65579.phpt b/Zend/tests/bug65579.phpt new file mode 100644 index 000..25d74ed --- /dev/null +++ b/Zend/tests/bug65579.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #65579 (Using traits with get_class_methods causes segfault) +--FILE-- +?php +trait ParentTrait { +public function testMethod() { } +} + +trait ChildTrait { +use ParentTrait { +testMethod as testMethodFromParentTrait; +} +public function testMethod() { } +} + +class TestClass { +use ChildTrait; +} + +$obj = new TestClass(); +var_dump(get_class_methods($obj)); +? +--EXPECT-- +array(2) { + [0]= + string(10) testMethod + [1]= + string(25) testmethodfromparenttrait +} diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 90d27b7..870a9b6 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3917,15 +3917,16 @@ ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name { zend_trait_alias *alias, **alias_ptr; - alias_ptr = ce-trait_aliases; - alias = *alias_ptr; - while (alias) { - if (alias-alias_len == len - !strncasecmp(name, alias-alias, alias-alias_len)) { - return alias-alias; - } - alias_ptr++; + if (alias_ptr = ce-trait_aliases) { alias = *alias_ptr; + while (alias) { + if (alias-alias_len == len + !strncasecmp(name, alias-alias, alias-alias_len)) { + return alias-alias; + } + alias_ptr++; + alias = *alias_ptr; + } } return name; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_API.c
Commit:e356d790309acf870dc22be7d00edaed8261 Author:Xinchen Hui larue...@php.net Thu, 29 Aug 2013 14:02:34 +0800 Parents: f0cb67402f2bcd3dc310cf938dfce799ccec7c7b 747daa53546bfa2c4a0fd88d2d3dffd30356c1ad Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e356d790309acf870dc22be7d00edaed8261 Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM Zend/zend_API.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed Bug #65315 session.hash_function silently fallback to default md5: NEWS ext/session/session.c ext/session/tests/session_hash_function_basic.phpt
Hey: I got this test script failed in my box: $ cat ext/session/tests/session_hash_function_basic.diff 005+ string(26) 9gjghoikm8eo1lvau5euuh8q61 005- string(32) %s 010+ string(32) jkdcvp3tf1ptsgof9edi515jsbh5p92o 010- string(40) %s 017+ string(32) ecdatafpdf4urjjrje6ver0o87i3hoe8 017- string(40) %s I am not sure whether the length of the string is must be a fixed len, so I leave it to you thanks On Fri, Aug 9, 2013 at 5:05 PM, Yasuo Ohgaki yohg...@php.net wrote: Commit:b6b425d2cf767e47e9d05fbfe1328f1485a488ef Author:Yasuo Ohgaki yohg...@php.net Fri, 9 Aug 2013 18:05:07 +0900 Parents: c53b425763d4cdbc9dc5708e22c6517dfd5e1e09 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b6b425d2cf767e47e9d05fbfe1328f1485a488ef Log: Fixed Bug #65315 session.hash_function silently fallback to default md5 Bugs: https://bugs.php.net/65315 Changed paths: M NEWS M ext/session/session.c A ext/session/tests/session_hash_function_basic.phpt Diff: diff --git a/NEWS b/NEWS index c679b90..02fa05e 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ PHP NEWS . Implemented internal operator overloading (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita) +- Session: + . Fixed Bug #65315 (session.hash_function silently fallback to default md5) +(Yasuo) + - mysqlnd: . Disabled flag for SP OUT variables for 5.5+ servers as they are not natively supported by the overlying APIs. (Andrey) diff --git a/ext/session/session.c b/ext/session/session.c index c02a10d..aee3308 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -727,6 +727,7 @@ static PHP_INI_MH(OnUpdateHashFunc) /* {{{ */ } #endif /* HAVE_HASH_EXT }}} */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, session.configuration 'session.hash_function' must be existing hash function. %s does not exist., new_value); return FAILURE; } /* }}} */ diff --git a/ext/session/tests/session_hash_function_basic.phpt b/ext/session/tests/session_hash_function_basic.phpt new file mode 100644 index 000..8b14a88 --- /dev/null +++ b/ext/session/tests/session_hash_function_basic.phpt @@ -0,0 +1,50 @@ +--TEST-- +Test session.hash_function ini setting : basic functionality +--SKIPIF-- +?php include('skipif.inc'); ? +--FILE-- +?php + +ob_start(); + +echo *** Testing session.hash_function : basic functionality ***\n; + +var_dump(ini_set('session.hash_function', 'md5')); +var_dump(session_start()); +var_dump(!empty(session_id()), session_id()); +var_dump(session_destroy()); + +var_dump(ini_set('session.hash_function', 'sha1')); +var_dump(session_start()); +var_dump(!empty(session_id()), session_id()); +var_dump(session_destroy()); + +var_dump(ini_set('session.hash_function', 'none')); // Should fail +var_dump(session_start()); +var_dump(!empty(session_id()), session_id()); +var_dump(session_destroy()); + + +echo Done; +ob_end_flush(); +? +--EXPECTF-- +*** Testing session.hash_function : basic functionality *** +string(1) 0 +bool(true) +bool(true) +string(32) %s +bool(true) +string(3) md5 +bool(true) +bool(true) +string(40) %s +bool(true) + +Warning: ini_set(): session.hash_func must be existing hash function. none does not exist. in %s/session_hash_function_basic.php on line 17 +bool(false) +bool(true) +bool(true) +string(40) %s +bool(true) +Done -- 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
[PHP-CVS] com php-src: Avoid compiler warning: Zend/zend_API.c
Commit:747daa53546bfa2c4a0fd88d2d3dffd30356c1ad Author:Xinchen Hui larue...@php.net Thu, 29 Aug 2013 14:02:15 +0800 Parents: 72027cd0848f1a5c580c601573448cdea9b095ca Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=747daa53546bfa2c4a0fd88d2d3dffd30356c1ad Log: Avoid compiler warning Changed paths: M Zend/zend_API.c Diff: diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 870a9b6..620a8f0 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3917,7 +3917,7 @@ ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name { zend_trait_alias *alias, **alias_ptr; - if (alias_ptr = ce-trait_aliases) { + if ((alias_ptr = ce-trait_aliases)) { alias = *alias_ptr; while (alias) { if (alias-alias_len == len -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison): NEWS ext/opcache/Optimizer/zend_optimizer_internal.h
Commit:790db9ff9b95d9dfaf6720593517dc0368f1fe7f Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 10:29:48 +0400 Parents: bd677b43a78ebc0779ed64781172225d15b35671 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=790db9ff9b95d9dfaf6720593517dc0368f1fe7f Log: Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison) Bugs: https://bugs.php.net/65561 Changed paths: M NEWS M ext/opcache/Optimizer/zend_optimizer_internal.h Diff: diff --git a/NEWS b/NEWS index dead9c7..f695ada 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,10 @@ PHP NEWS . Fixed bug #65554 (createFromFormat broken when weekday name is followed by some delimiters). (Valentin Logvinskiy, Stas). +- OPCache: + . Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). +(Terry Ellison) + - Openssl: . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in some cases). (Mark Jones) diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index a9bad01..0b1afba 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -28,8 +28,8 @@ # define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v))) # define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, v)) #else -# define VAR_NUM(v) ((v)/(sizeof(temp_variable))) -# define NUM_VAR(v) ((v)*(sizeof(temp_variable))) +# define VAR_NUM(v) ((v)/ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) +# define NUM_VAR(v) ((v)*ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) #endif #define INV_COND(op) ((op) == ZEND_JMPZ? ZEND_JMPNZ: ZEND_JMPZ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed compatibility with php-5.2: ext/opcache/Optimizer/zend_optimizer_internal.h
Commit:94816ed9bfe16bd1507a1abc708793e41c06ad79 Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 10:44:07 +0400 Parents: 632f733ce4d31f7a46e1d70b9454dcb12a98b089 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=94816ed9bfe16bd1507a1abc708793e41c06ad79 Log: Fixed compatibility with php-5.2 Changed paths: M ext/opcache/Optimizer/zend_optimizer_internal.h Diff: diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 0b1afba..616bdf7 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -27,9 +27,12 @@ #if ZEND_EXTENSION_API_NO PHP_5_4_X_API_NO # define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v))) # define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, v)) -#else +#elif ZEND_EXTENSION_API_NO PHP_5_2_X_API_NO # define VAR_NUM(v) ((v)/ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) # define NUM_VAR(v) ((v)*ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable))) +#else +# define VAR_NUM(v) ((v)/(sizeof(temp_variable))) +# define NUM_VAR(v) ((v)*(sizeof(temp_variable))) #endif #define INV_COND(op) ((op) == ZEND_JMPZ? ZEND_JMPNZ: ZEND_JMPZ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien): Zend/zend_API.c Zend/zend_builtin_functions.c
Commit:dfc6feb6e84f27094e6a2e3947caa094f7c35d26 Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 11:16:56 +0400 Parents: 15694f66b2732962b760463803a68a1fa3bb098f Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dfc6feb6e84f27094e6a2e3947caa094f7c35d26 Log: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Bugs: https://bugs.php.net/61759 Changed paths: M Zend/zend_API.c M Zend/zend_builtin_functions.c Diff: diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 620a8f0..125a1a2 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2514,7 +2514,12 @@ ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_c char *lcname = zend_str_tolower_dup(name, name_len); int ret; - ret = zend_hash_add(CG(class_table), lcname, name_len+1, ce, sizeof(zend_class_entry *), NULL); + if (lcname[0] == '\\') { + ret = zend_hash_add(CG(class_table), lcname+1, name_len, ce, sizeof(zend_class_entry *), NULL); + } else { + ret = zend_hash_add(CG(class_table), lcname, name_len+1, ce, sizeof(zend_class_entry *), NULL); + } + efree(lcname); if (ret == SUCCESS) { ce-refcount++; diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 72d9058..04f4ebe 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1399,15 +1399,8 @@ ZEND_FUNCTION(class_alias) return; } - if (!autoload) { - lc_name = do_alloca(class_name_len + 1, use_heap); - zend_str_tolower_copy(lc_name, class_name, class_name_len); + found = zend_lookup_class_ex(class_name, class_name_len, NULL, autoload, ce TSRMLS_CC); - found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) ce); - free_alloca(lc_name, use_heap); - } else { - found = zend_lookup_class(class_name, class_name_len, ce TSRMLS_CC); - } if (found == SUCCESS) { if ((*ce)-type == ZEND_USER_CLASS) { if (zend_register_class_alias_ex(alias_name, alias_name_len, *ce TSRMLS_CC) == SUCCESS) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien): NEWS
Commit:15694f66b2732962b760463803a68a1fa3bb098f Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 11:12:06 +0400 Parents: 747daa53546bfa2c4a0fd88d2d3dffd30356c1ad Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=15694f66b2732962b760463803a68a1fa3bb098f Log: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Bugs: https://bugs.php.net/61759 Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index b718a74..6169cd0 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ PHP NEWS . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert) . Improved fix for bug #63186 (compile failure on netbsd). (Matteo) . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees) + . Fixed bug #61759 (class_alias() should accept classes with leading +backslashes). (Julien) . Fixed bug #61345 (CGI mode - make install don't work). (Michael Heimpold) . Cherry-picked some DTrace build commits (allowing builds on Linux, bug #62691, and bug #63706) from PHP 5.5 branch -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: NEWS Zend/zend_API.c Zend/zend_builtin_functions.c
Commit:0f3977bc0fd31ee188ee50f44b130420812b93a9 Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 11:19:02 +0400 Parents: 94816ed9bfe16bd1507a1abc708793e41c06ad79 dfc6feb6e84f27094e6a2e3947caa094f7c35d26 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f3977bc0fd31ee188ee50f44b130420812b93a9 Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) Conflicts: NEWS Bugs: https://bugs.php.net/61759 Changed paths: MM NEWS MM Zend/zend_API.c MM Zend/zend_builtin_functions.c Diff: diff --cc NEWS index f695ada,6169cd0..86eb571 --- a/NEWS +++ b/NEWS @@@ -8,12 -9,24 +8,14 @@@ PH DTRACE_FUNCTION_*). (Chris Jones) . Fixed bug #65483 (quoted-printable encode stream filter incorrectly encoding spaces). (Michael M Slusarz) - . Fixed bug #65481 (shutdown segfault due to serialize) (Mike) - . Fixed bug #65470 (Segmentation fault in zend_error() with + . Fixed bug #65470 (Segmentation fault in zend_error() with --enable-dtrace). (Chris Jones, Kris Van Hees) - . Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference -fails). (Laruence) - . Fixed bug #65304 (Use of max int in array_sum). (Laruence) - . Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very -limited case). (Arpad) . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert) - . Improved fix for bug #63186 (compile failure on netbsd). (Matteo) . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees) + . Fixed bug #61759 (class_alias() should accept classes with leading + backslashes). (Julien) - . Fixed bug #61345 (CGI mode - make install don't work). (Michael Heimpold) - . Cherry-picked some DTrace build commits (allowing builds on Linux, -bug #62691, and bug #63706) from PHP 5.5 branch - . Fixed bug #61268 (--enable-dtrace leads make to clobber -Zend/zend_dtrace.d) (Chris Jones) + . Fixed bug #46311 (Pointer aliasing issue results in miscompile on gcc4.4). +(Nikita Popov) - cURL: . Fixed bug #65458 (curl memory leak). (Adam) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/opcache/Optimizer/pass1_5.c
Commit:ec173433dac5d5ef64644cbc0e66454326a6725c Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 11:57:19 +0400 Parents: 462f2167ae760793a4152b7e359d8ad75f342a05 5015c4af6c1d2af992e0525f10e93b01043730e1 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ec173433dac5d5ef64644cbc0e66454326a6725c Log: Merge branch 'PHP-5.5' * PHP-5.5: Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var) Conflicts: NEWS Bugs: https://bugs.php.net/65510 Changed paths: MM ext/opcache/Optimizer/pass1_5.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var): NEWS ext/opcache/Optimizer/pass1_5.c ext/opcache/tests/bug65510.phpt
Commit:5015c4af6c1d2af992e0525f10e93b01043730e1 Author:Dmitry Stogov dmi...@zend.com Thu, 29 Aug 2013 11:56:01 +0400 Parents: 0f3977bc0fd31ee188ee50f44b130420812b93a9 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5015c4af6c1d2af992e0525f10e93b01043730e1 Log: Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var) Bugs: https://bugs.php.net/65510 Changed paths: M NEWS M ext/opcache/Optimizer/pass1_5.c A ext/opcache/tests/bug65510.phpt Diff: diff --git a/NEWS b/NEWS index 86eb571..518c997 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ PHP NEWS - OPCache: . Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison) + . Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var). (Dmitry) - Openssl: . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c index 46406c3..795b954 100644 --- a/ext/opcache/Optimizer/pass1_5.c +++ b/ext/opcache/Optimizer/pass1_5.c @@ -408,6 +408,7 @@ if (ZEND_OPTIMIZER_PASS_1 OPTIMIZATION_LEVEL) { int var = opline-result.var; int level = 0; zend_op *op = opline + 1; + zend_op *use = NULL; while (op end) { if (op-opcode == ZEND_BEGIN_SILENCE) { @@ -420,21 +421,36 @@ if (ZEND_OPTIMIZER_PASS_1 OPTIMIZATION_LEVEL) { } } if (op-op1_type == IS_VAR op-op1.var == var) { - op-op1_type = IS_CV; - op-op1.var = zend_optimizer_lookup_cv(op_array, + if (use) { + /* used more than once */ + use = NULL; + break; + } + use = op; + } else if (op-op2_type == IS_VAR op-op2.var == var) { + if (use) { + /* used more than once */ + use = NULL; + break; + } + use = op; + } + op++; + } + if (use) { + if (use-op1_type == IS_VAR use-op1.var == var) { + use-op1_type = IS_CV; + use-op1.var = zend_optimizer_lookup_cv(op_array, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline))); MAKE_NOP(opline); - break; - } else if (op-op2_type == IS_VAR op-op2.var == var) { - op-op2_type = IS_CV; - op-op2.var = zend_optimizer_lookup_cv(op_array, + } else if (use-op2_type == IS_VAR use-op2.var == var) { + use-op2_type = IS_CV; + use-op2.var = zend_optimizer_lookup_cv(op_array, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline))); MAKE_NOP(opline); - break; } - op++; } } break; diff --git a/ext/opcache/tests/bug65510.phpt b/ext/opcache/tests/bug65510.phpt new file mode 100644 index 000..ba19d27 --- /dev/null +++ b/ext/opcache/tests/bug65510.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var) +--INI-- +allow_url_include=1 +opcache.enable=1 +opcache.enable_cli=1 +--SKIPIF-- +?php require_once('skipif.inc'); ? +--FILE-- +?php +function
Re: [PHP-CVS] com php-src: Fixed Bug #65315 session.hash_function silently fallback to default md5: NEWS ext/session/session.c ext/session/tests/session_hash_function_basic.phpt
On Thu, Aug 29, 2013 at 3:22 PM, Laruence larue...@php.net wrote: Hey: I got this test script failed in my box: $ cat ext/session/tests/session_hash_function_basic.diff 005+ string(26) 9gjghoikm8eo1lvau5euuh8q61 005- string(32) %s 010+ string(32) jkdcvp3tf1ptsgof9edi515jsbh5p92o 010- string(40) %s 017+ string(32) ecdatafpdf4urjjrje6ver0o87i3hoe8 017- string(40) %s I am not sure whether the length of the string is must be a fixed len, so I leave it to you thanks Thank you for point it out. I'll fix the test. It's probably the hash char setting. I'll also check the error message, too. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net
[PHP-CVS] com php-src: Remove ini dependency in test: ext/session/tests/session_hash_function_basic.phpt
Commit:09ed50fa448832303c1f89538e59a41ee121ebd2 Author:Yasuo Ohgaki yohg...@php.net Fri, 30 Aug 2013 11:46:16 +0900 Parents: ec173433dac5d5ef64644cbc0e66454326a6725c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=09ed50fa448832303c1f89538e59a41ee121ebd2 Log: Remove ini dependency in test Changed paths: M ext/session/tests/session_hash_function_basic.phpt Diff: diff --git a/ext/session/tests/session_hash_function_basic.phpt b/ext/session/tests/session_hash_function_basic.phpt index 45b8bc0..663852d 100644 --- a/ext/session/tests/session_hash_function_basic.phpt +++ b/ext/session/tests/session_hash_function_basic.phpt @@ -2,6 +2,8 @@ Test session.hash_function ini setting : basic functionality --SKIPIF-- ?php include('skipif.inc'); ? +--INI-- +session.hash_bits_per_character=4 --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS: NEWS
Commit:4e3de606b54425029cc4617215a3360bb8550b2f Author:Xinchen Hui larue...@php.net Fri, 30 Aug 2013 11:22:58 +0800 Parents: e4fe53e2007791ff20fa00d5663f1766ccc5b148 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e3de606b54425029cc4617215a3360bb8550b2f Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 518c997..d637d0a 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2013, PHP 5.5.4 - Core: + . Fixed bug #60598 (cli/apache sapi segfault on objects manipulation). +(Laruence) . Improved fputcsv() to allow specifying escape character. . Fixed bug #65490 (Duplicate calls to get lineno filename for DTRACE_FUNCTION_*). (Chris Jones) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #60598 (cli/apache sapi segfault on objects manipulation): NEWS Zend/tests/bug60598.phpt Zend/zend_objects_API.c
Commit:7da6498342d76c34892bfa247bc1779d8f5ee1e6 Author:Xinchen Hui larue...@php.net Fri, 30 Aug 2013 11:20:24 +0800 Parents: dfc6feb6e84f27094e6a2e3947caa094f7c35d26 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7da6498342d76c34892bfa247bc1779d8f5ee1e6 Log: Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) Bugs: https://bugs.php.net/60598 Changed paths: M NEWS A Zend/tests/bug60598.phpt M Zend/zend_objects_API.c Diff: diff --git a/NEWS b/NEWS index 6169cd0..42b69f5 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2013, PHP 5.4.20 - Core: + . Fixed bug #60598 (cli/apache sapi segfault on objects manipulation). +(Laruence) . Fixed bug #65579 (Using traits with get_class_methods causes segfault). (Adam) . Fixed bug #65490 (Duplicate calls to get lineno filename for diff --git a/Zend/tests/bug60598.phpt b/Zend/tests/bug60598.phpt new file mode 100644 index 000..75a --- /dev/null +++ b/Zend/tests/bug60598.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #60598 (cli/apache sapi segfault on objects manipulation) +--FILE-- +?php +define('OBJECT_COUNT', 1); + +$containers = array(); + +class Object { +protected $_guid = 0; +public function __construct() { + global $containers; + $this-guid = 1; +$containers[spl_object_hash($this)] = $this; +} +public function __destruct() { + global $containers; +$containers[spl_object_hash($this)] = NULL; +} +} + +for ($i = 0; $i OBJECT_COUNT; ++$i) { +new Object(); +} + +// You probably won't see this because of the zend_mm_heap corrupted +? +If you see this, try to increase OBJECT_COUNT to 100,000 +--EXPECT-- +If you see this, try to increase OBJECT_COUNT to 100,000 diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 1fe5d0c..b5dd48f 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -57,6 +57,11 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS obj-dtor(obj-object, i TSRMLS_CC); obj = objects-object_buckets[i].bucket.obj; obj-refcount--; + + if (obj-refcount == 0) { + /* in case gc_collect_cycle is triggered before free_storage */ + GC_REMOVE_ZOBJ_FROM_BUFFER(obj); + } } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php