Re: [PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60169.phpt branches/PHP_5_4/Zend/zend_vm_def.h branches/PHP_5_4/Zend/zend_vm_execute.h trunk/Zend/tests/bug601
Hi Arnaud : I am not sure that can we assume all the ptr_ptr is equal to the &(var.ptr) if we check this in fetch_dim_r if so, I think it's is a better fix. I will try to study further more :) and if you have a new fix, plz revert this. I am very glad with that there is a better way to fix it :) thanks On Thu, Nov 3, 2011 at 8:11 PM, Arnaud Le Blanc wrote: > Hi laruence, > > Thanks for this. I didn't seen your comment on bug #60169 until now, and as > the bug was assigned to me I've also attempted to fix it and ended up with the > same fix :) > > However, I've noticed that there are other places setting ptr_ptr to NULL, and > they cause crashes too. > > For example, this crashes: > > $a = 1; > list($b) = $a->prop = 1; > > So I was wondering if we should always set ptr_ptr, or if we should check its > value in ZEND_FETCH_DIM_R instead. What do you think ? > > Best regards, > > Le Thursday 3 November 2011 04:59:41, Xinchen Hui a écrit : >> laruence Thu, 03 Nov 2011 03:59:41 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=318716 >> >> Log: >> Fix bug #60169 Conjunction of ternary and list crashes PHP >> >> Bug: https://bugs.php.net/60169 (Assigned) Conjunction of ternary and list >> crashes PHP >> >> Changed paths: >> U php/php-src/branches/PHP_5_4/NEWS >> U php/php-src/branches/PHP_5_4/Zend/tests/bug60169.phpt >> U php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h >> U php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h >> U php/php-src/trunk/Zend/tests/bug60169.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
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/package.xml branches/PHP_5_3/ext/oci8/php_oci8.h branches/PHP_5_4/ext/oci8/package.xml branches/PHP_5_4/ext/oci8/php_oci8.h trunk/ext/oci8/packag
sixd Thu, 03 Nov 2011 22:13:34 + Revision: http://svn.php.net/viewvc?view=revision&revision=318760 Log: Bump OCI8 version to 1.4.7 stable in preparation for PHP 5.3.9 Changed paths: U php/php-src/branches/PHP_5_3/ext/oci8/package.xml U php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h U php/php-src/branches/PHP_5_4/ext/oci8/package.xml U php/php-src/branches/PHP_5_4/ext/oci8/php_oci8.h U php/php-src/trunk/ext/oci8/package.xml U php/php-src/trunk/ext/oci8/php_oci8.h Modified: php/php-src/branches/PHP_5_3/ext/oci8/package.xml === --- php/php-src/branches/PHP_5_3/ext/oci8/package.xml 2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/branches/PHP_5_3/ext/oci8/package.xml 2011-11-03 22:13:34 UTC (rev 318760) @@ -33,7 +33,7 @@ no - 2011-10-25 + 2011-11-03 12:00:00 @@ -41,7 +41,7 @@ 1.4.7 - devel + stable stable http://www.php.net/license";>PHP Modified: php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h === --- php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/branches/PHP_5_3/ext/oci8/php_oci8.h2011-11-03 22:13:34 UTC (rev 318760) @@ -46,7 +46,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "1.4.7-devel" +#define PHP_OCI8_VERSION "1.4.7" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry Modified: php/php-src/branches/PHP_5_4/ext/oci8/package.xml === --- php/php-src/branches/PHP_5_4/ext/oci8/package.xml 2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/branches/PHP_5_4/ext/oci8/package.xml 2011-11-03 22:13:34 UTC (rev 318760) @@ -33,7 +33,7 @@ no - 2011-10-25 + 2011-11-03 12:00:00 @@ -41,7 +41,7 @@ 1.4.7 - devel + stable stable http://www.php.net/license";>PHP Modified: php/php-src/branches/PHP_5_4/ext/oci8/php_oci8.h === --- php/php-src/branches/PHP_5_4/ext/oci8/php_oci8.h2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/branches/PHP_5_4/ext/oci8/php_oci8.h2011-11-03 22:13:34 UTC (rev 318760) @@ -46,7 +46,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "1.4.7-devel" +#define PHP_OCI8_VERSION "1.4.7" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry Modified: php/php-src/trunk/ext/oci8/package.xml === --- php/php-src/trunk/ext/oci8/package.xml 2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/trunk/ext/oci8/package.xml 2011-11-03 22:13:34 UTC (rev 318760) @@ -33,7 +33,7 @@ no - 2011-10-25 + 2011-11-03 12:00:00 @@ -41,7 +41,7 @@ 1.4.7 - devel + stable stable http://www.php.net/license";>PHP Modified: php/php-src/trunk/ext/oci8/php_oci8.h === --- php/php-src/trunk/ext/oci8/php_oci8.h 2011-11-03 21:52:59 UTC (rev 318759) +++ php/php-src/trunk/ext/oci8/php_oci8.h 2011-11-03 22:13:34 UTC (rev 318760) @@ -46,7 +46,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "1.4.7-devel" +#define PHP_OCI8_VERSION "1.4.7" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry -- 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/oci8/tests/bug42496_1.phpt branches/PHP_5_3/ext/oci8/tests/bug42496_2.phpt branches/PHP_5_3/ext/oci8/tests/bug43497.phpt branches/PHP_5_3/ext/oci8/tes
sixd Thu, 03 Nov 2011 21:52:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=318759 Log: Replace custom "stress_test" setting with generic SKIP_SLOW_TESTS Changed paths: U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug42496_1.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug42496_2.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug44113.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/conn_attr_4.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/details.inc U php/php-src/branches/PHP_5_3/ext/oci8/tests/error2.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/extauth_01.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/extauth_02.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/extauth_03.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/lob_043.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/pecl_bug10194_blob_64.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug42496_1.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug42496_2.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug43497.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug43497_92.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug44113.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/conn_attr_4.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/details.inc U php/php-src/branches/PHP_5_4/ext/oci8/tests/error2.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/extauth_01.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/extauth_02.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/extauth_03.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/lob_043.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194_blob.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/pecl_bug10194_blob_64.phpt U php/php-src/trunk/ext/oci8/tests/bug42496_1.phpt U php/php-src/trunk/ext/oci8/tests/bug42496_2.phpt U php/php-src/trunk/ext/oci8/tests/bug43497.phpt U php/php-src/trunk/ext/oci8/tests/bug43497_92.phpt U php/php-src/trunk/ext/oci8/tests/bug44113.phpt U php/php-src/trunk/ext/oci8/tests/conn_attr_4.phpt U php/php-src/trunk/ext/oci8/tests/details.inc U php/php-src/trunk/ext/oci8/tests/error2.phpt U php/php-src/trunk/ext/oci8/tests/extauth_01.phpt U php/php-src/trunk/ext/oci8/tests/extauth_02.phpt U php/php-src/trunk/ext/oci8/tests/extauth_03.phpt U php/php-src/trunk/ext/oci8/tests/lob_043.phpt U php/php-src/trunk/ext/oci8/tests/pecl_bug10194.phpt U php/php-src/trunk/ext/oci8/tests/pecl_bug10194_blob.phpt U php/php-src/trunk/ext/oci8/tests/pecl_bug10194_blob_64.phpt Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug42496_1.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug42496_1.phpt 2011-11-03 21:45:58 UTC (rev 318758) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug42496_1.phpt 2011-11-03 21:52:59 UTC (rev 318759) @@ -4,7 +4,7 @@ true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (preg_match('/^1[01]\./', oci_client_version()) != 1) { die("skip expected output only valid with Oracle 10g or greater version of client"); } Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt 2011-11-03 21:45:58 UTC (rev 318758) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt 2011-11-03 21:52:59 UTC (rev 318759) @@ -4,7 +4,7 @@ true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt trunk/ext/mysqli/tests/mysqli_cla
uw Thu, 03 Nov 2011 17:39:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=318750 Log: Improving test to reflect latest API changes Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt 2011-11-03 16:51:39 UTC (rev 318749) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt 2011-11-03 17:39:39 UTC (rev 318750) @@ -22,7 +22,6 @@ 'autocommit' => true, 'change_user' => true, 'character_set_name' => true, - 'client_encoding' => true, 'close'=> true, 'commit' => true, 'connect' => true, @@ -57,9 +56,13 @@ 'thread_safe' => true, 'use_result' => true, ); + + if (version_compare(PHP_VERSION, '5.3.99', '<=')) { + $expected_methods['client_encoding'] = true; + } + if ($IS_MYSQLND) { // mysqlnd only - /* $expected_methods['get_cache_stats'] = true; */ /* $expected_methods['get_client_stats'] = true; */ $expected_methods['get_connection_stats'] = true; $expected_methods['reap_async_query'] = true; @@ -96,16 +99,71 @@ printf("ok\n"); printf("\nClass variables:\n"); - $variables = array_keys(get_class_vars(get_class($mysqli))); - sort($variables); - foreach ($variables as $k => $var) - printf("%s\n", $var); + $expected_class_variables = $expected_object_variables = array( + "affected_rows" => true, + "client_info" => true, + "client_version" => true, + "connect_errno" => true, + "connect_error" => true, + "errno"=> true, + "error"=> true, + "field_count" => true, + "host_info" => true, + "info"=> true, + "insert_id" => true, + "protocol_version" => true, + "server_info" => true, + "server_version" => true, + "sqlstate" => true, + "stat"=> true, + "thread_id" => true, + "warning_count" => true, + ); + + if (version_compare(PHP_VERSION, '5.3.99', '>')) { + $expected_class_variables["error_list"] = true; + $expected_object_variables["error_list"] = true; + } + + $variables = get_class_vars(get_class($mysqli)); + foreach ($variables as $var => $v) { + if (isset($expected_class_variables[$var])) { + unset($expected_class_variables[$var]); + unset($variables[$var]); + } + } + + if (!empty($expected_class_variables)) { + printf("Dumping list of missing class variables\n"); + var_dump($expected_class_variables); + } + if (!empty($variables)) { + printf("Dumping list of unexpected class variables\n"); + var_dump($variables); + } + echo "ok\n"; + printf("\nObject variables:\n"); - $variables = array_keys(get_object_vars($mysqli)); - foreach ($variables as $k => $var) - printf("%s\n", $var); + $variables = get_object_vars($mysqli); + foreach ($variables as $var => $v) { + if (isset($expected_object_variables[$var])) { + unset($expected_object_variables[$var]); + unset($variables[$var]); + } + } + if (!empty($expected_object_variables)) { + printf("Dumping list of missing object variables\n"); + var_dump($expected_object_variables); + } + if (!empty($variables)) { + printf("Dumping list of unexpected object variables\n"); + var_dump($variables); + } + echo "ok\n"; + + printf("\nMagic, magic properties:\n"); assert(mysqli_affected_rows($link) === $mysqli->affected_rows); @@ -133,6 +191,11 @@ $mysqli->error, gettype($mysqli->error), mysqli_error($link), gettype(mysqli_error($link))); + if (version_compare(PHP_VERSION, '5.3.99', '>')) { + assert(mysqli_error_list($link) === $mysqli->error_list); + assert(is_array($mysqli->error_list)); + } + assert(mysqli_field_count($link) === $mysqli->field_count); printf("mysqli->field_count = '%s'/%s ('%s'/%s)\n", $mysqli->field_count, gettype($mysqli->field_count), @@ -148,6 +211,11 @@ $mysqli->sqlstate, gettype($mysqli->sqlstate), mysqli_sqlstate($link), gettype(mysqli_sqlstate($link))); + assert(mysqli_stat($link) === $mysqli->stat); + printf("mysqli->stat = '%s'/%s ('%s'/%s)\n", + $mysqli->stat, gettype($mysqli->stat), + mysqli_stat($link), gettype(mysqli_stat($link))); + assert(mysqli_get_host_info($link) === $mysqli->host_info); printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n", $mysqli->host_info, gettype($mysqli->host_info), @@ -217,42 +285,10 @@ ok Class variables: -affected_rows -client_info -client_version -connect_errno -connect_error -errno -error -field_count -host_info -info -insert_id -protocol_version -server_info -server_version -sqlstate -thread_id -warning_count +ok Object variables: -affected_rows -client_info -client_version -connect_errno
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
fa Thu, 03 Nov 2011 16:23:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=318745 Log: Added info to 2 fixed bugs 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-11-03 16:20:11 UTC (rev 318744) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 16:23:48 UTC (rev 318745) @@ -5,7 +5,15 @@ - PHP-FPM SAPI: . Fixed bug #60179 (php_flag and php_value does not work properly). (fat) +- Intl: + . Fixed bug #60192 (SegFault when Collator not constructed +properly). (Florian) +- Gd: + . Fixed bug #60160 (imagefill() doesn't work correctly +for small images). (Florian) + + 03 Nov 2011, PHP 5.3.9RC1 - Core: -- 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/intl/collator/collator_compare.c branches/PHP_5_3/ext/intl/collator/collator_locale.c branches/PHP_5_3/ext/intl/collator/collator_sort.c branches/PHP_
fa Thu, 03 Nov 2011 16:20:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=318744 Log: Redid the fix for #60192 with suggestions by Pierre and Kalle Bug: https://bugs.php.net/60192 (Closed) SegFault when Collator not constructed properly Changed paths: U php/php-src/branches/PHP_5_3/ext/intl/collator/collator_compare.c U php/php-src/branches/PHP_5_3/ext/intl/collator/collator_locale.c U php/php-src/branches/PHP_5_3/ext/intl/collator/collator_sort.c U php/php-src/branches/PHP_5_3/ext/intl/tests/bug60192-compare.phpt U php/php-src/branches/PHP_5_3/ext/intl/tests/bug60192-getlocale.phpt U php/php-src/branches/PHP_5_3/ext/intl/tests/bug60192-getsortkey.phpt U php/php-src/branches/PHP_5_3/ext/intl/tests/bug60192-sort.phpt U php/php-src/branches/PHP_5_3/ext/intl/tests/bug60192-sortwithsortkeys.phpt U php/php-src/branches/PHP_5_4/ext/intl/collator/collator_compare.c U php/php-src/branches/PHP_5_4/ext/intl/collator/collator_locale.c U php/php-src/branches/PHP_5_4/ext/intl/collator/collator_sort.c U php/php-src/branches/PHP_5_4/ext/intl/tests/bug60192-compare.phpt U php/php-src/branches/PHP_5_4/ext/intl/tests/bug60192-getlocale.phpt U php/php-src/branches/PHP_5_4/ext/intl/tests/bug60192-getsortkey.phpt U php/php-src/branches/PHP_5_4/ext/intl/tests/bug60192-sort.phpt U php/php-src/branches/PHP_5_4/ext/intl/tests/bug60192-sortwithsortkeys.phpt U php/php-src/trunk/ext/intl/collator/collator_compare.c U php/php-src/trunk/ext/intl/collator/collator_locale.c U php/php-src/trunk/ext/intl/collator/collator_sort.c U php/php-src/trunk/ext/intl/tests/bug60192-compare.phpt U php/php-src/trunk/ext/intl/tests/bug60192-getlocale.phpt U php/php-src/trunk/ext/intl/tests/bug60192-getsortkey.phpt U php/php-src/trunk/ext/intl/tests/bug60192-sort.phpt U php/php-src/trunk/ext/intl/tests/bug60192-sortwithsortkeys.phpt Modified: php/php-src/branches/PHP_5_3/ext/intl/collator/collator_compare.c === --- php/php-src/branches/PHP_5_3/ext/intl/collator/collator_compare.c 2011-11-03 15:47:19 UTC (rev 318743) +++ php/php-src/branches/PHP_5_3/ext/intl/collator/collator_compare.c 2011-11-03 16:20:11 UTC (rev 318744) @@ -58,7 +58,15 @@ /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + RETURN_FALSE; + } + /* * Compare given strings (converting them to UTF-16 first). */ @@ -99,10 +107,6 @@ RETURN_FALSE; } - if (!co || !co->ucoll) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Object not initialized"); - } - /* Then compare them. */ result = ucol_strcoll( co->ucoll, Modified: php/php-src/branches/PHP_5_3/ext/intl/collator/collator_locale.c === --- php/php-src/branches/PHP_5_3/ext/intl/collator/collator_locale.c 2011-11-03 15:47:19 UTC (rev 318743) +++ php/php-src/branches/PHP_5_3/ext/intl/collator/collator_locale.c 2011-11-03 16:20:11 UTC (rev 318744) @@ -52,7 +52,12 @@ COLLATOR_METHOD_FETCH_OBJECT; if (!co || !co->ucoll) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Object not initialized"); + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + + RETURN_FALSE; } /* Get locale by specified type. */ Modified: php/php-src/branches/PHP_5_3/ext/intl/collator/collator_sort.c === --- php/php-src/branches/PHP_5_3/ext/intl/collator/collator_sort.c 2011-11-03 15:47:19 UTC (rev 318743) +++ php/php-src/branches/PHP_5_3/ext/intl/collator/collator_sort.c 2011-11-03 16:20:11 UTC (rev 318744) @@ -74,7 +74,10 @@ co = (Collator_object *) zend_object_store_get_object( INTL_G(current_collator) TSRMLS_CC ); if (!co || !co->ucoll) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Object not initialized"); + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), +"Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); } /* Compare the strings using ICU. */ @@ -391,7 +394,15 @@ /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not i
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c trunk/sapi/fpm/fpm/fpm_conf.c
fat Thu, 03 Nov 2011 15:47:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=318743 Log: - Fixed bug #60179 (php_flag and php_value does not work properly) Bug: https://bugs.php.net/60179 (Assigned) php_flag and php_value does not work properly Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c U php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-11-03 15:26:34 UTC (rev 318742) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 15:47:19 UTC (rev 318743) @@ -2,7 +2,10 @@ ||| ?? ??? 2011, PHP 5.3.9 +- PHP-FPM SAPI: + . Fixed bug #60179 (php_flag and php_value does not work properly). (fat) + 03 Nov 2011, PHP 5.3.9RC1 - Core: Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c2011-11-03 15:26:34 UTC (rev 318742) +++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_conf.c2011-11-03 15:47:19 UTC (rev 318743) @@ -539,7 +539,7 @@ if (convert_to_bool) { char *err = fpm_conf_set_boolean(value, &subconf, 0); if (err) return err; - kv->value = strdup(b ? "On" : "Off"); + kv->value = strdup(b ? "1" : "0"); } else { kv->value = strdup(Z_STRVAL_P(value)); if (fpm_conf_expand_pool_name(&kv->value) == -1) { @@ -1343,20 +1343,10 @@ err = fpm_conf_set_array(key, value, &config, 0); } else if (!strcmp("php_value", Z_STRVAL_P(name))) { - if (!*Z_STRVAL_P(value)) { - zlog(ZLOG_ERROR, "[%s:%d] empty value", ini_filename, ini_lineno); - *error = 1; - return; - } config = (char *)current_wp->config + WPO(php_values); err = fpm_conf_set_array(key, value, &config, 0); } else if (!strcmp("php_admin_value", Z_STRVAL_P(name))) { - if (!*Z_STRVAL_P(value)) { - zlog(ZLOG_ERROR, "[%s:%d] empty value", ini_filename, ini_lineno); - *error = 1; - return; - } config = (char *)current_wp->config + WPO(php_admin_values); err = fpm_conf_set_array(key, value, &config, 0); Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c2011-11-03 15:26:34 UTC (rev 318742) +++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_conf.c2011-11-03 15:47:19 UTC (rev 318743) @@ -539,7 +539,7 @@ if (convert_to_bool) { char *err = fpm_conf_set_boolean(value, &subconf, 0); if (err) return err; - kv->value = strdup(b ? "On" : "Off"); + kv->value = strdup(b ? "1" : "0"); } else { kv->value = strdup(Z_STRVAL_P(value)); if (fpm_conf_expand_pool_name(&kv->value) == -1) { @@ -1343,20 +1343,10 @@ err = fpm_conf_set_array(key, value, &config, 0); } else if (!strcmp("php_value", Z_STRVAL_P(name))) { - if (!*Z_STRVAL_P(value)) { - zlog(ZLOG_ERROR, "[%s:%d] empty value", ini_filename, ini_lineno); - *error = 1; - return; - } config = (char *)current_wp->config + WPO(php_values); err = fpm_conf_set_array(key, value, &config, 0); } else if (!strcmp("php_admin_value", Z_STRVAL_P(name))) { - if (!*Z_STRVAL_P(value)) { - zlog(ZLOG_ERROR, "[%s:%d] empty value", ini_filename, ini_lineno); - *error = 1; - return; - } config = (char *)current_wp->config + WPO(php_admin_values); err = fpm_conf_set_array(key, value, &config, 0); Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-11-03 15:26:34 UTC (rev 318742) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-11-03 15:47:19 UTC (rev 318743) @@ -539,7 +539,7 @@ if (convert_to_bool) { char *err = fpm_conf_set_boolean(value, &subconf, 0); if (err) return err; - kv->value = strdup(b ? "On" : "Off"); + kv->value = strdup(b ? "1" : "0"); } else {
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS configure.in main/php_version.h
johannes Thu, 03 Nov 2011 15:26:34 + Revision: http://svn.php.net/viewvc?view=revision&revision=318742 Log: Back to -dev Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/configure.in U php/php-src/branches/PHP_5_3/main/php_version.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-11-03 15:10:36 UTC (rev 318741) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 15:26:34 UTC (rev 318742) @@ -1,5 +1,8 @@ PHPNEWS ||| +?? ??? 2011, PHP 5.3.9 + + 03 Nov 2011, PHP 5.3.9RC1 - Core: Modified: php/php-src/branches/PHP_5_3/configure.in === --- php/php-src/branches/PHP_5_3/configure.in 2011-11-03 15:10:36 UTC (rev 318741) +++ php/php-src/branches/PHP_5_3/configure.in 2011-11-03 15:26:34 UTC (rev 318742) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=9 -PHP_EXTRA_VERSION="RC1" +PHP_EXTRA_VERSION="RC2-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` Modified: php/php-src/branches/PHP_5_3/main/php_version.h === --- php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-03 15:10:36 UTC (rev 318741) +++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-03 15:26:34 UTC (rev 318742) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 9 -#define PHP_EXTRA_VERSION "RC1" -#define PHP_VERSION "5.3.9RC1" +#define PHP_EXTRA_VERSION "RC2-dev" +#define PHP_VERSION "5.3.9RC2-dev" #define PHP_VERSION_ID 50309 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/tags/
johannes Thu, 03 Nov 2011 15:10:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=318741 Log: PHP 5.3.9RC1 Changed paths: A + php/php-src/tags/php_5_3_9RC1/ (from php/php-src/branches/PHP_5_3/:r318740) Property changes on: php/php-src/tags/php_5_3_9RC1 ___ Added: svn:ignore + *.gcda *.gcno *.la *.lo *.ncb *.opt *.plg FBCIndex FBCLockFolder deps libs Debug Debug_TS Makefile Makefile.fragments Makefile.objects Release Release_TS Release_TSDbg Release_TS_inline Release_inline ZendEngine1 _libs acconfig.h aclocal.m4 autom4te.cache bsd_converted buildconf.stamp buildmk.stamp confdefs.h config.cache config.h.in config.log config.nice config.nice.bat config.status config_vars.mk configuration-parser.c configuration-parser.h configuration-parser.output configuration-scanner.c configure configure.bat configure.js conftest conftest.c debug.log diff generated_lists include install-sh internal_functions.c lcov_data lcov_html libs libtool meta_cc meta_ccld missing mkinstalldirs modules php php-*.tar.gz php5.spec php_lcov.info php_test_results_*.txt php_version.h results.txt shlibtool stamp-h test.php3 tmp-php.ini want_dependencies x64 Added: svn:mergeinfo + /php/php-src/trunk:284726,305015,305018-305019 -- 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 configure.in main/php_version.h
johannes Thu, 03 Nov 2011 15:08:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=318740 Log: - PHP 5.3.9RC1 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/configure.in U php/php-src/branches/PHP_5_3/main/php_version.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-11-03 14:54:26 UTC (rev 318739) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 15:08:19 UTC (rev 318740) @@ -1,6 +1,6 @@ PHPNEWS ||| -?? ??? 2011, PHP 5.3.9 +03 Nov 2011, PHP 5.3.9RC1 - Core: . Fixed bug #60139 (Anonymous functions create cycles not detected by the Modified: php/php-src/branches/PHP_5_3/configure.in === --- php/php-src/branches/PHP_5_3/configure.in 2011-11-03 14:54:26 UTC (rev 318739) +++ php/php-src/branches/PHP_5_3/configure.in 2011-11-03 15:08:19 UTC (rev 318740) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=9 -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` Modified: php/php-src/branches/PHP_5_3/main/php_version.h === --- php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-03 14:54:26 UTC (rev 318739) +++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-03 15:08:19 UTC (rev 318740) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 9 -#define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "5.3.9-dev" +#define PHP_EXTRA_VERSION "RC1" +#define PHP_VERSION "5.3.9RC1" #define PHP_VERSION_ID 50309 -- 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
johannes Thu, 03 Nov 2011 14:51:10 + Revision: http://svn.php.net/viewvc?view=revision&revision=318737 Log: - Minor NEWS cleanup # 80 columns, indention, entries are sentences ending with a period. Bug: https://bugs.php.net/80 (Closed) SecureVar() missing 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-11-03 13:37:12 UTC (rev 318736) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 14:51:10 UTC (rev 318737) @@ -28,7 +28,7 @@ is_a and is_subclass_of). (alan_k) . 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 #50982 (incorrect assumption of PAGE_SIZE size). (Dmitry) @@ -53,7 +53,7 @@ - MySQLi extension: . Fixed bug #55859 (mysqli->stat property access gives error). (Andrey) . Fixed bug #55582 (mysqli_num_rows() returns always 0 for unbuffered, when - mysqlnd is used). (Andrey) +mysqlnd is used). (Andrey) . Fixed bug #55703 (PHP crash when calling mysqli_fetch_fields). (eran at zend dot com, Laruence) @@ -63,7 +63,7 @@ (Andrey) - Oracle Database extension (OCI8): - . Increased maxium Oracle error message buffer length for new 11.2.0.3 size + . Increased maxium Oracle error message buffer length for new 11.2.0.3 size. (Chris Jones) - PDO @@ -72,13 +72,13 @@ - PDO MySQL driver: . Fixed bug #60155 (pdo_mysql.default_socket ignored). (Johannes) . Fixed bug #55870 (PDO ignores all SSL parameters when used with mysql -native driver) (Pierre) +native driver). (Pierre) . Fixed bug #54158 (MYSQLND+PDO MySQL requires #define -MYSQL_OPT_LOCAL_INFILE) (Andrey) +MYSQL_OPT_LOCAL_INFILE). (Andrey) - PDO OCI driver: - . Fixed bug #55768 (PDO_OCI can't resume Oracle session after it's been killed) - (mikhail dot v dot gavrilov at gmail dot com, Chris Jones, Tony) + . Fixed bug #55768 (PDO_OCI can't resume Oracle session after it's been +killed). (mikhail dot v dot gavrilov at gmail dot com, Chris Jones, Tony) - Phar: . Fixed bug #52013 (Unable to decompress files in a compressed phar). (Hannes) @@ -118,7 +118,8 @@ (bug #48601). (chregu, rrichards) - Sockets: - . Fixed bug #60048 (sa_len a #define on IRIX). (china at thewrittenword dot com) + . Fixed bug #60048 (sa_len a #define on IRIX). (china at thewrittenword dot +com) - SPL: . Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY). @@ -127,15 +128,17 @@ (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) + . 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. Fixes Bug #54446. (Chregu, +Nicolas Gregoire) - Fileinfo: . Fixed bug #60094 (C++ comment fails in c89). (Laruence) - FTP: - . Fixed bug #60183 (out of sync ftp responses). (bram at ebskamp dot me, rasmus) + . Fixed bug #60183 (out of sync ftp responses). (bram at ebskamp dot me, +rasmus) - SAPI: . Fixed bug #60205 (possible integer overflow in content_length). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60169.phpt branches/PHP_5_4/Zend/zend_vm_def.h branches/PHP_5_4/Zend/zend_vm_execute.h trunk/Zend/tests/bug60169.p
Hi laruence, Thanks for this. I didn't seen your comment on bug #60169 until now, and as the bug was assigned to me I've also attempted to fix it and ended up with the same fix :) However, I've noticed that there are other places setting ptr_ptr to NULL, and they cause crashes too. For example, this crashes: $a = 1; list($b) = $a->prop = 1; So I was wondering if we should always set ptr_ptr, or if we should check its value in ZEND_FETCH_DIM_R instead. What do you think ? Best regards, Le Thursday 3 November 2011 04:59:41, Xinchen Hui a écrit : > laruence Thu, 03 Nov 2011 03:59:41 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=318716 > > Log: > Fix bug #60169 Conjunction of ternary and list crashes PHP > > Bug: https://bugs.php.net/60169 (Assigned) Conjunction of ternary and list > crashes PHP > > Changed paths: > U php/php-src/branches/PHP_5_4/NEWS > U php/php-src/branches/PHP_5_4/Zend/tests/bug60169.phpt > U php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h > U php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h > U php/php-src/trunk/Zend/tests/bug60169.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
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
On 11/03/2011 01:21 PM, Stefan Marr wrote: Hi Antony: On 02 Nov 2011, at 22:05, Antony Dovgal wrote: tony2001 Wed, 02 Nov 2011 21:05:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=318705 Log: initialize variable and fix segfaulting tests Thanks for catching this one and the one in svnrev 318723. Do you have test cases which trigger these bugs by any chance? Yeah, some 30 tests in Zend/tests/traits: /local/qa/5_4_non-ZTS/Zend/tests/traits/bug55137.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug55214.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug55355.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug55372.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug55424.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug4a.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug4b.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug4d.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug4f.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bug4g.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/abstract-methods01.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/abstract-methods02.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/abstract-methods04.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/alias-semantics.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/alias-semantics02.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/bugs/alias01.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/error_012.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/flattening001.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/flattening003.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/interface_002.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language001.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language002.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language003.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language004.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language005.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language006.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language007.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language008a.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language008b.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language009.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language012.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/language013.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/methods_001.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/methods_003.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/noctor001.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/static_001.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/static_002.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/static_003.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/static_004.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/static_get_called_class.phpt /local/qa/5_4_non-ZTS/Zend/tests/traits/trait_constant_001.phpt Same tests when executed under Valgrind (run-test.php -m) showed the warnings I fixed in my last commit. -- Wbr, Antony Dovgal --- http://pinba.org - realtime profiling 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_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
Hi Antony: On 02 Nov 2011, at 22:05, Antony Dovgal wrote: > tony2001 Wed, 02 Nov 2011 21:05:36 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=318705 > > Log: > initialize variable and fix segfaulting tests Thanks for catching this one and the one in svnrev 318723. Do you have test cases which trigger these bugs by any chance? Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- 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_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
tony2001 Thu, 03 Nov 2011 08:39:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=318723 Log: use jmp_addr only when it's initialized Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_compile.c U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-11-03 08:25:01 UTC (rev 318722) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-11-03 08:39:12 UTC (rev 318723) @@ -3718,9 +3718,14 @@ for(i = 0; i < fe->op_array.last; i++) { opcode_copy[i] = fe->op_array.opcodes[i]; if (opcode_copy[i].op1_type != IS_CONST) { - if (opcode_copy[i].op1.jmp_addr >= fe->op_array.opcodes && - opcode_copy[i].op1.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { - opcode_copy[i].op1.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op1.jmp_addr - fe->op_array.opcodes); + switch (opcode_copy[i].opcode) { + case ZEND_GOTO: + case ZEND_JMP: + if (opcode_copy[i].op1.jmp_addr && opcode_copy[i].op1.jmp_addr >= fe->op_array.opcodes && + opcode_copy[i].op1.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { + opcode_copy[i].op1.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op1.jmp_addr - fe->op_array.opcodes); + } + break; } } else { /* if __CLASS__ i.e. T_CLASS_C was used, we need to fix it up here */ @@ -3739,9 +3744,18 @@ } if (opcode_copy[i].op2_type != IS_CONST) { - if (opcode_copy[i].op2.jmp_addr >= fe->op_array.opcodes && - opcode_copy[i].op2.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { - opcode_copy[i].op2.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op2.jmp_addr - fe->op_array.opcodes); + switch (opcode_copy[i].opcode) { + case ZEND_JMPZ: + case ZEND_JMPNZ: + case ZEND_JMPZ_EX: + case ZEND_JMPNZ_EX: + case ZEND_JMP_SET: + case ZEND_JMP_SET_VAR: + if (opcode_copy[i].op2.jmp_addr && opcode_copy[i].op2.jmp_addr >= fe->op_array.opcodes && + opcode_copy[i].op2.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { + opcode_copy[i].op2.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op2.jmp_addr - fe->op_array.opcodes); + } + break; } } else { /* if __CLASS__ i.e. T_CLASS_C was used, we need to fix it up here */ Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2011-11-03 08:25:01 UTC (rev 318722) +++ php/php-src/trunk/Zend/zend_compile.c 2011-11-03 08:39:12 UTC (rev 318723) @@ -3718,9 +3718,14 @@ for(i = 0; i < fe->op_array.last; i++) { opcode_copy[i] = fe->op_array.opcodes[i]; if (opcode_copy[i].op1_type != IS_CONST) { - if (opcode_copy[i].op1.jmp_addr >= fe->op_array.opcodes && - opcode_copy[i].op1.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { - opcode_copy[i].op1.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op1.jmp_addr - fe->op_array.opcodes); + switch (opcode_copy[i].opcode) { + case ZEND_GOTO: + case ZEND_JMP: + if (opcode_copy[i].op1.jmp_addr && opcode_copy[i].op1.jmp_addr >= fe->op_array.opcodes && + opcode_copy[i].op1.jmp_addr < fe->op_array.opcodes + fe->op_array.last) { + opcode_copy[i].op1.jmp_addr = opcode_copy + (fe->op_array.opcodes[i].op1.jmp_addr - fe->op_array.opcodes); + } + break; } } else { /* if __CLASS__ i.e. T_CLASS_C was used, we need to fix it up here */ @@ -3739,9 +3744,18 @@
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 wrote: > laruence Thu, 03 Nov 2011 07:26:09 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=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
[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 branch
laruence Thu, 03 Nov 2011 07:26:09 + Revision: http://svn.php.net/viewvc?view=revision&revision=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 Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-11-03 05:16:47 UTC (rev 318717) +++ php/php-src/branches/PHP_5_3/NEWS 2011-11-03 07:26:09 UTC (rev 318718) @@ -137,7 +137,10 @@ - FTP: . Fixed bug #60183 (out of sync ftp responses). (bram at ebskamp dot me, rasmus) +- SAPI: + . Fixed bug #60205 (possible integer overflow in content_length). (Laruence) + 23 Aug 2011, PHP 5.3.8 - Core: Modified: php/php-src/branches/PHP_5_3/sapi/apache/mod_php5.c === --- php/php-src/branches/PHP_5_3/sapi/apache/mod_php5.c 2011-11-03 05:16:47 UTC (rev 318717) +++ php/php-src/branches/PHP_5_3/sapi/apache/mod_php5.c 2011-11-03 07:26:09 UTC (rev 318718) @@ -533,7 +533,7 @@ SG(request_info).request_uri = r->uri; SG(request_info).request_method = (char *)r->method; SG(request_info).content_type = (char *) table_get(r->subprocess_env, "CONTENT_TYPE"); - SG(request_info).content_length = (content_length ? atoi(content_length) : 0); + SG(request_info).content_length = (content_length ? atol(content_length) : 0); SG(sapi_headers).http_response_code = r->status; SG(request_info).proto_num = r->proto_num; Modified: php/php-src/branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c === --- php/php-src/branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c 2011-11-03 05:16:47 UTC (rev 318717) +++ php/php-src/branches/PHP_5_3/sapi/apache2filter/sapi_apache2.c 2011-11-03 07:26:09 UTC (rev 318718) @@ -420,7 +420,7 @@ efree(content_type); content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length"); - SG(request_info).content_length = (content_length ? atoi(content_length) : 0); + SG(request_info).content_length = (content_length ? atol(content_length) : 0); apr_table_unset(f->r->headers_out, "Content-Length"); apr_table_unset(f->r->headers_out, "Last-Modified"); Modified: php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c === --- php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c 2011-11-03 05:16:47 UTC (rev 318717) +++ php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c 2011-11-03 07:26:09 UTC (rev 318718) @@ -484,7 +484,7 @@ r->no_local_copy = 1; content_length = (char *) apr_table_get(r->headers_in, "Content-Length"); - SG(request_info).content_length = (content_length ? atoi(content_length) : 0); + SG(request_info).content_length = (content_length ? atol(content_length) : 0); apr_table_unset(r->headers_out, "Content-Length"); apr_table_unset(r->headers_out, "Last-Modified"); Modified: php/php-src/branches/PHP_5_3/sapi/apache_hooks/mod_php5.c === --- php/php-src/branches/PHP_5_3/sapi/apache_hooks/mod_php5.c 2011-11-03 05:16:47 UTC (rev 318717) +++ php/php-src/branches/PHP_5_3/sapi/apache_hooks/mod_php5.c 2011-11-03 07:26:09 UTC (rev 318718) @@ -587,7 +587,7 @@ SG(request_info).request_method = (char *)r->method; SG(request_info).proto_num = r->proto_num; SG(request_info).content_type = (char *) table_get(r->subprocess_env, "CONTENT_TYPE"); - SG(request_info).content_length = (content_length ? atoi(content_length) : 0); + SG(request_info).content_length = (content_length ? atol(content_length) : 0); SG(sapi_headers).http_response_code = r->st