Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php
On 19 March 2012 20:15, Christopher Jones wrote: >>> Hi Mike, >>> >>> Can you update (or get updated) http://qa.php.net/phpt_details.php >>> with this feature? Here we go: https://github.com/php/web-qa/pull/3 > > It's way too buried for my liking, but the path is: > > http://qa.php.net/ > http://qa.php.net/howtohelp.php > http://qa.php.net/write-test.php > > Then down in the "PHPT structure details" section is a link title "here" to > http://qa.php.net/phpt_details.php Jeez! -- Regards, Mike -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php
Hi Chris, On 19 March 2012 17:30, Christopher Jones wrote: > Hi Mike, > > Can you update (or get updated) http://qa.php.net/phpt_details.php > with this feature? Thanks again for the heads up! Could you please also reveal how to get there from the homepage? I'm just curious... ;) -- Regards, Mike -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php
On 03/19/2012 12:08 PM, Michael Wallner wrote: Hi Chris, On 19 March 2012 17:30, Christopher Jones wrote: Hi Mike, Can you update (or get updated) http://qa.php.net/phpt_details.php with this feature? Thanks again for the heads up! Could you please also reveal how to get there from the homepage? I'm just curious... ;) It's way too buried for my liking, but the path is: http://qa.php.net/ http://qa.php.net/howtohelp.php http://qa.php.net/write-test.php Then down in the "PHPT structure details" section is a link title "here" to http://qa.php.net/phpt_details.php Chris -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php
On 03/17/2012 02:35 AM, Michael Wallner wrote: mike Sat, 17 Mar 2012 09:35:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=324319 Log: add --PUT-- section support based on POST_RAW Changed paths: U php/php-src/branches/PHP_5_3/run-tests.php U php/php-src/branches/PHP_5_4/run-tests.php U php/php-src/trunk/run-tests.php Hi Mike, Can you update (or get updated) http://qa.php.net/phpt_details.php with this feature? Thanks, Chris Modified: php/php-src/branches/PHP_5_3/run-tests.php === --- php/php-src/branches/PHP_5_3/run-tests.php 2012-03-17 09:19:10 UTC (rev 324318) +++ php/php-src/branches/PHP_5_3/run-tests.php 2012-03-17 09:35:25 UTC (rev 324319) @@ -1342,8 +1342,8 @@ $tested = trim($section_text['TEST']); - /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + /* For GET/POST/PUT tests, check if cgi sapi is available and if it is, use it. */ + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi . ' -C '; @@ -1718,6 +1718,46 @@ save_text($tmp_post, $request); $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1< \"$tmp_post\""; + } elseif (array_key_exists('PUT', $section_text)&& !empty($section_text['PUT'])) { + + $post = trim($section_text['PUT']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started = false; + + foreach ($raw_lines as $line) { + + if (empty($env['CONTENT_TYPE'])&& preg_match('/^Content-Type:(.*)/i', $line, $res)) { + $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); + continue; + } + + if ($started) { + $request .= "\n"; + } + + $started = true; + $request .= $line; + } + + $env['CONTENT_LENGTH'] = strlen($request); + $env['REQUEST_METHOD'] = 'PUT'; + + if (empty($request)) { + if ($JUNIT) { + $JUNIT['test_total']++; + $JUNIT['test_error']++; + $JUNIT['result_xml'] .= ''."\n"; + $JUNIT['result_xml'] .= ''."\n"; + $JUNIT['result_xml'] .= ''."\n"; + } + return 'BORKED'; + } + + save_text($tmp_post, $request); + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1< \"$tmp_post\""; + } else if (array_key_exists('POST', $section_text)&& !empty($section_text['POST'])) { $post = trim($section_text['POST']); Modified: php/php-src/branches/PHP_5_4/run-tests.php === --- php/php-src/branches/PHP_5_4/run-tests.php 2012-03-17 09:19:10 UTC (rev 324318) +++ php/php-src/branches/PHP_5_4/run-tests.php 2012-03-17 09:35:25 UTC (rev 324319) @@ -1342,8 +1342,8 @@ $tested = trim($section_text['TEST']); - /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + /* For GET/POST/PUT tests, check if cgi sapi is available and if it is, use it. */ + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi . ' -C '; @@ -1718,6 +1718,46 @@ save_text($tmp_post, $request); $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1< \"$tmp_post\""; + } elseif (array_key_exists('PUT', $section_text)&& !empty($section_text['PUT'])) { + + $post = trim($section_text['PUT']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started =
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/reflection/php_reflection.c branches/PHP_5_3/ext/reflection/tests/bug61388.phpt branches/PHP_5_4/ext/reflection/php_reflection.c
cataphract Sun, 18 Mar 2012 18:23:27 + Revision: http://svn.php.net/viewvc?view=revision&revision=324337 Log: - Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads when get_properties returns a hash table with (inaccessible) dynamic numeric properties). Bug: https://bugs.php.net/61388 (Assigned) ReflectionObject:getProperties called on ArrayObject throws Segmentation Fault Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c A php/php-src/branches/PHP_5_3/ext/reflection/tests/bug61388.phpt U php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c A php/php-src/branches/PHP_5_4/ext/reflection/tests/bug61388.phpt U php/php-src/trunk/ext/reflection/php_reflection.c A php/php-src/trunk/ext/reflection/tests/bug61388.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-18 18:18:01 UTC (rev 324336) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-18 18:23:27 UTC (rev 324337) @@ -72,6 +72,13 @@ . Fixed bug #61088 (Memory leak in readline_callback_handler_install). (Nikic, Laruence) +- Reflection: + . Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads +when get_properties returns a hash table with (inaccessible) dynamic +numeric properties). (Gustavo) + . Fixed bug #60968 (Late static binding doesn't work with +ReflectionMethod::invokeArgs()). (Laruence) + - SOAP . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no @@ -90,10 +97,6 @@ - SQLite3 extension: . Add createCollation() method. (Brad Dewar) -- Reflection: - . Fixed bug #60968 (Late static binding doesn't work with -ReflectionMethod::invokeArgs()). (Laruence) - - Session: . Fixed bug #60860 (session.save_handler=user without defined function core dumps). (Felipe) Modified: php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c === --- php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c 2012-03-18 18:18:01 UTC (rev 324336) +++ php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c 2012-03-18 18:23:27 UTC (rev 324337) @@ -3667,6 +3667,13 @@ zend_class_entry *ce = *va_arg(args, zend_class_entry**); zval *retval = va_arg(args, zval*), member; + /* under some circumstances, the properties hash table may contain numeric +* properties (e.g. when casting from array). This is a WONT FIX bug, at +* least for the moment. Ignore these */ + if (hash_key->nKeyLength == 0) { + return 0; + } + if (hash_key->arKey[0] == '\0') { return 0; /* non public cannot be dynamic */ } Added: php/php-src/branches/PHP_5_3/ext/reflection/tests/bug61388.phpt === --- php/php-src/branches/PHP_5_3/ext/reflection/tests/bug61388.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/reflection/tests/bug61388.phpt 2012-03-18 18:23:27 UTC (rev 324337) @@ -0,0 +1,32 @@ +--TEST-- +ReflectionObject:getProperties() issues invalid reads when it get_properties returns a hash table with (inaccessible) dynamic numeric properties +--FILE-- +getProperties(ReflectionProperty::IS_PUBLIC)); + +$x = (object)array("a", "oo" => "b"); +$reflObj = new ReflectionObject($x); +print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC)); +--EXPECT-- +Array +( +[0] => ReflectionProperty Object +( +[name] => test +[class] => ArrayObject +) + +) +Array +( +[0] => ReflectionProperty Object +( +[name] => oo +[class] => stdClass +) + +) Property changes on: php/php-src/branches/PHP_5_3/ext/reflection/tests/bug61388.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c === --- php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c 2012-03-18 18:18:01 UTC (rev 324336) +++ php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c 2012-03-18 18:23:27 UTC (rev 324337) @@ -3832,6 +3832,13 @@ zend_class_entry *ce = *va_arg(args, zend_class_entry**); zval *retval = va_arg(args, zval*), member; + /* under some circumstances, the properties hash table may contain numeric +* properties (e.g. when casting from array). This is a WONT FIX bug, at +* least for the moment. Ignore these */ + if (hash_key->nKeyLength == 0) { +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_directory.c branches/PHP_5_3/ext/spl/tests/bug61418.phpt branches/PHP_5_4/ext/spl/spl_directory.c branches/PHP_5_4/ext/s
cataphract Sun, 18 Mar 2012 15:07:20 + Revision: http://svn.php.net/viewvc?view=revision&revision=324327 Log: - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or FilesystemIterator's iterators are requested more than once without having had its dtor callback called in between). Bug: https://bugs.php.net/61418 (Assigned) Segmentation foult using FiltesystemIterator & RegexIterator Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug61418.phpt U php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c A php/php-src/branches/PHP_5_4/ext/spl/tests/bug61418.phpt U php/php-src/trunk/ext/spl/spl_directory.c A php/php-src/trunk/ext/spl/tests/bug61418.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-18 13:19:50 UTC (rev 324326) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-18 15:07:20 UTC (rev 324327) @@ -81,6 +81,9 @@ - SPL . Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe) + . Fixed bug #61418 (Segmentation fault when DirectoryIterator's or +FilesystemIterator's iterators are requested more than once without +having had its dtor callback called in between). (Gustavo) . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) . Fixed bug #61326 (ArrayObject comparison). (Gustavo) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c 2012-03-18 13:19:50 UTC (rev 324326) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c 2012-03-18 15:07:20 UTC (rev 324327) @@ -120,6 +120,16 @@ spl_filesystem_file_free_line(intern TSRMLS_CC); break; } + + { + zend_object_iterator *iterator; + iterator = (zend_object_iterator*) +spl_filesystem_object_to_iterator(intern); + if (iterator->data != NULL) { + iterator->data = NULL; + iterator->funcs->dtor(iterator TSRMLS_CC); + } + } efree(object); } /* }}} */ @@ -1627,10 +1637,15 @@ dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); iterator = spl_filesystem_object_to_iterator(dir_object); - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); - iterator->intern.data = (void*)object; - iterator->intern.funcs = &spl_filesystem_dir_it_funcs; - iterator->current = object; + /* initialize iterator if it wasn't gotten before */ + if (iterator->intern.data == NULL) { + iterator->intern.data = object; + iterator->intern.funcs = &spl_filesystem_dir_it_funcs; + /* ->current must be initialized; rewind doesn't set it and valid + * doesn't check whether it's set */ + iterator->current = object; + } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } @@ -1709,15 +1724,15 @@ static void spl_filesystem_tree_it_dtor(zend_object_iterator *iter TSRMLS_DC) { spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter; - zval *zfree = (zval*)iterator->intern.data; - if (iterator->current) { - zval_ptr_dtor(&iterator->current); + if (iterator->intern.data) { + zval *object = iterator->intern.data; + zval_ptr_dtor(&object); + } else { + if (iterator->current) { + zval_ptr_dtor(&iterator->current); + } } - iterator->intern.data = NULL; /* mark as unused */ - /* free twice as we add ref twice */ - zval_ptr_dtor(&zfree); - zval_ptr_dtor(&zfree); } /* }}} */ @@ -1828,10 +1843,12 @@ dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); iterator = spl_filesystem_object_to_iterator(dir_object); - Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2); - iterator->intern.data = (void*)object; - iterator->intern.funcs = &spl_filesystem_tree_it_funcs; - iterator->current = NULL; + /* initialize iterator if wasn't gotten before */ + if (iterator->intern.data == NULL) { + iterator->intern.data = object; + iterator->intern.funcs = &spl_filesystem_tree_it_funcs; + } + zval_add_ref(&object); return (zend_object_iterator*)iterator; } Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug61418.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug61418.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug61418.phpt 2012-03-18 15:07:20 UTC (rev 324327) @@ -0,0 +1,23 @@ +--TEST-- +Bug #61418: Segmentation fault using FiltesystemIterator & RegexIterator +--FILE-- + $file) +{ +} +unset($regexpIterator); +unset($fileIterator); + +$dirIterator = new DirectoryIterator(__DIR__); +$regexpIterator2 = new RegexIterator($dirIterator, '#.*#'); +foreach ($dirIterator as $key => $file) +{ +} +unset($regexpIterator2); +unset($dirIterator); +?> +==DONE== +--EXPECT-- +==DONE==
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug61115-1.phpt branches/PHP_5_3/ext/standard/tests/streams/bug61115-2.phpt branches/PHP_5_3/ext/standard
cataphract Sat, 17 Mar 2012 19:37:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=324324 Log: - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition for deleting the context was too broad) and so prevents segfaults in new circumstances (where the inhibition was not broad enough). Bugs: https://bugs.php.net/61371 (Verified) stream_context_create() causes memory leaks on use streams_socket_create https://bugs.php.net/61115 (Assigned) Stream related segfault on fatal error in php_stream_context_del_link Changed paths: U php/php-src/branches/PHP_5_3/NEWS A + php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-1.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A + php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-2.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61371.phpt U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/branches/PHP_5_4/ext/standard/streamsfuncs.c A + php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug61115-1.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A + php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug61115-2.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A + php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug61115.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug61371.phpt U php/php-src/branches/PHP_5_4/main/streams/streams.c A + php/php-src/trunk/ext/standard/tests/streams/bug61115-1.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A + php/php-src/trunk/ext/standard/tests/streams/bug61115-2.phpt (from php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt:r324314) A php/php-src/trunk/ext/standard/tests/streams/bug61371.phpt U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-17 17:51:51 UTC (rev 324323) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-17 19:37:30 UTC (rev 324324) @@ -98,6 +98,8 @@ SessionHandler::write()). (Ilia) - Streams: + . Fixed bug #61371 (stream_context_create() causes memory leaks on use +streams_socket_create). (Gustavo) . Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS). (Gustavo) . Fixed bug #61115 (stream related segfault on fatal error in Copied: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-1.phpt (from rev 324314, php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt) === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-1.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-1.phpt 2012-03-17 19:37:30 UTC (rev 324324) @@ -0,0 +1,11 @@ +--TEST-- +Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link - variation 1 +--FILE-- + +--EXPECTF-- +Fatal error: Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes) in %s on line %d Copied: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-2.phpt (from rev 324314, php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt) === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-2.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115-2.phpt 2012-03-17 19:37:30 UTC (rev 324324) @@ -0,0 +1,10 @@ +--TEST-- +Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link - variation 2 +--FILE-- + +==DONE== +--EXPECT-- +==DONE== Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61371.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61371.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61371.phpt 2012-03-17 19:37:30 UTC (rev 324324) @@ -0,0 +1,40 @@ +--TEST-- +Bug #61371: stream_context_create() causes memory leaks on use streams_socket_create +--FILE-- + +--EXPECTF-- +memory: %dkb +bool(true) +memory: %dkb +bool(true) +memory: %dkb +memory: %dkb +bool(true) +memory: %dkb +bool(true) +memory: %dkb Property changes on: php/php-src/branches/P
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php
mike Sat, 17 Mar 2012 09:35:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=324319 Log: add --PUT-- section support based on POST_RAW Changed paths: U php/php-src/branches/PHP_5_3/run-tests.php U php/php-src/branches/PHP_5_4/run-tests.php U php/php-src/trunk/run-tests.php Modified: php/php-src/branches/PHP_5_3/run-tests.php === --- php/php-src/branches/PHP_5_3/run-tests.php 2012-03-17 09:19:10 UTC (rev 324318) +++ php/php-src/branches/PHP_5_3/run-tests.php 2012-03-17 09:35:25 UTC (rev 324319) @@ -1342,8 +1342,8 @@ $tested = trim($section_text['TEST']); - /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + /* For GET/POST/PUT tests, check if cgi sapi is available and if it is, use it. */ + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi . ' -C '; @@ -1718,6 +1718,46 @@ save_text($tmp_post, $request); $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\""; + } elseif (array_key_exists('PUT', $section_text) && !empty($section_text['PUT'])) { + + $post = trim($section_text['PUT']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started = false; + + foreach ($raw_lines as $line) { + + if (empty($env['CONTENT_TYPE']) && preg_match('/^Content-Type:(.*)/i', $line, $res)) { + $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); + continue; + } + + if ($started) { + $request .= "\n"; + } + + $started = true; + $request .= $line; + } + + $env['CONTENT_LENGTH'] = strlen($request); + $env['REQUEST_METHOD'] = 'PUT'; + + if (empty($request)) { + if ($JUNIT) { + $JUNIT['test_total']++; + $JUNIT['test_error']++; + $JUNIT['result_xml'] .= ''."\n"; + $JUNIT['result_xml'] .= ''."\n"; + $JUNIT['result_xml'] .= ''."\n"; + } + return 'BORKED'; + } + + save_text($tmp_post, $request); + $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\""; + } else if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { $post = trim($section_text['POST']); Modified: php/php-src/branches/PHP_5_4/run-tests.php === --- php/php-src/branches/PHP_5_4/run-tests.php 2012-03-17 09:19:10 UTC (rev 324318) +++ php/php-src/branches/PHP_5_4/run-tests.php 2012-03-17 09:35:25 UTC (rev 324319) @@ -1342,8 +1342,8 @@ $tested = trim($section_text['TEST']); - /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + /* For GET/POST/PUT tests, check if cgi sapi is available and if it is, use it. */ + if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi . ' -C '; @@ -1718,6 +1718,46 @@ save_text($tmp_post, $request); $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\""; + } elseif (array_key_exists('PUT', $section_text) && !empty($section_text['PUT'])) { + + $post = trim($section_text['PUT']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started = false; + + foreach ($raw_lines as $line) { + + if (empty($env['CONTENT_TYPE']) && preg_match('/^Content-Type:(.*)/i', $line, $res))
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/interbase/ibase_service.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/interbase/ibase_service.c trunk/ext/interbase/ibase_service
iliaaThu, 15 Mar 2012 19:59:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=324281 Log: Fixed bug #60947 (Segmentation fault while executing ibase_db_info) Bug: https://bugs.php.net/60947 (Assigned) Segmentation fault while executing ibase_db_info Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c U php/php-src/trunk/ext/interbase/ibase_service.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-15 16:04:07 UTC (rev 324280) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-15 19:59:26 UTC (rev 324281) @@ -29,6 +29,10 @@ function is by reference). (Nikita Popov) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) +- Ibase + . Fixed bug #60947 (Segmentation fault while executing ibase_db_info). +(Ilia) + - Installation . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones) Modified: php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c === --- php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c 2012-03-15 16:04:07 UTC (rev 324280) +++ php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c 2012-03-15 19:59:26 UTC (rev 324281) @@ -321,6 +321,7 @@ heap_p = heap_buf + res_size; } result += 2; + *(result+line_len) = 0; snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), "%s\n", result); heap_p += line_len +2; goto query_loop; /* repeat until result is exhausted */ Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-15 16:04:07 UTC (rev 324280) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-15 19:59:26 UTC (rev 324281) @@ -38,6 +38,10 @@ . Fixed bug #52719 (array_walk_recursive crashes if third param of the function is by reference). (Nikita Popov) +- Ibase + . Fixed bug #60947 (Segmentation fault while executing ibase_db_info). +(Ilia) + - Installation . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones) Modified: php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c === --- php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c 2012-03-15 16:04:07 UTC (rev 324280) +++ php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c 2012-03-15 19:59:26 UTC (rev 324281) @@ -321,6 +321,7 @@ heap_p = heap_buf + res_size; } result += 2; + *(result+line_len) = 0; snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), "%s\n", result); heap_p += line_len +2; goto query_loop; /* repeat until result is exhausted */ Modified: php/php-src/trunk/ext/interbase/ibase_service.c === --- php/php-src/trunk/ext/interbase/ibase_service.c 2012-03-15 16:04:07 UTC (rev 324280) +++ php/php-src/trunk/ext/interbase/ibase_service.c 2012-03-15 19:59:26 UTC (rev 324281) @@ -321,6 +321,7 @@ heap_p = heap_buf + res_size; } result += 2; + *(result+line_len) = 0; snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), "%s\n", result); heap_p += line_len +2; goto query_loop; /* repeat until result is exhausted */ -- 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/pdo_odbc/odbc_stmt.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c trunk/ext/pdo_odbc/odbc_stmt.c
iliaaWed, 14 Mar 2012 20:20:33 + Revision: http://svn.php.net/viewvc?view=revision&revision=324251 Log: Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). Bug: https://bugs.php.net/61212 (Open) PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c U php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-14 20:08:14 UTC (rev 324250) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-14 20:20:33 UTC (rev 324251) @@ -47,6 +47,9 @@ . Fixed bug #61194 (PDO should export compression flag with myslqnd). (Johannes) +- PDO_odbc + . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia) + - PDO_pgsql . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed rows on postgresql >= 9). (ben dot pineau at gmail dot com) Modified: php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c === --- php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:08:14 UTC (rev 324250) +++ php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:20:33 UTC (rev 324251) @@ -637,12 +637,14 @@ if (C->fetched_len != SQL_NO_TOTAL) { /* use size suggested by the driver, if it knows it */ - alloced = C->fetched_len + 1; + buf = emalloc(C->fetched_len + 1); + memcpy(buf, C->data, C->fetched_len); + buf[C->fetched_len] = 0; + used = C->fetched_len; + } else { + buf = estrndup(C->data, 256); + used = 255; /* not 256; the driver NUL terminated the buffer */ } - - buf = emalloc(alloced); - memcpy(buf, C->data, 256); - used = 255; /* not 256; the driver NUL terminated the buffer */ do { C->fetched_len = 0; Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-14 20:08:14 UTC (rev 324250) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-14 20:20:33 UTC (rev 324251) @@ -75,6 +75,9 @@ . Fixed bug #61194 (PDO should export compression flag with myslqnd). (Johannes) +- PDO_odbc + . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia) + - Phar . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikita Popov) Modified: php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c === --- php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:08:14 UTC (rev 324250) +++ php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:20:33 UTC (rev 324251) @@ -637,12 +637,14 @@ if (C->fetched_len != SQL_NO_TOTAL) { /* use size suggested by the driver, if it knows it */ - alloced = C->fetched_len + 1; + buf = emalloc(C->fetched_len + 1); + memcpy(buf, C->data, C->fetched_len); + buf[C->fetched_len] = 0; + used = C->fetched_len; + } else { + buf = estrndup(C->data, 256); + used = 255; /* not 256; the driver NUL terminated the buffer */ } - - buf = emalloc(alloced); - memcpy(buf, C->data, 256); - used = 255; /* not 256; the driver NUL terminated the buffer */ do { C->fetched_len = 0; Modified: php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c === --- php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:08:14 UTC (rev 324250) +++ php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c 2012-03-14 20:20:33 UTC (rev 324251) @@ -637,12 +637,14 @@ if (C->fetched_len != SQL_NO_TOTAL) { /* use size suggested by the driver, if it knows it */ - alloced = C->fetched_len + 1; + buf = emalloc(C->fetched_len + 1); +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_report.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_report.phpt trunk/ext/mysqli/tests/mysqli_report.phpt
uw Wed, 14 Mar 2012 14:55:09 + Revision: http://svn.php.net/viewvc?view=revision&revision=324242 Log: Test for MySQL version.Variable is deprecated in MySQL 5.6. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_report.phpt U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_report.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_report.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_report.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_report.phpt 2012-03-14 14:05:54 UTC (rev 324241) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_report.phpt 2012-03-14 14:55:09 UTC (rev 324242) @@ -194,37 +194,39 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[017] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); - // this might cause a warning - no index used - if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_slow_queries'")) - printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (mysqli_get_server_version($link) <= 50600) { + // this might cause a warning - no index used + if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_slow_queries'")) + printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if (!$row = mysqli_fetch_assoc($res)) - printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (!$row = mysqli_fetch_assoc($res)) + printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - $log_slow_query = ('ON' == $row['Value']); + $log_slow_query = ('ON' == $row['Value']); - if (mysqli_get_server_version($link) >= 51011) { - // this might cause a warning - no index used - if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_queries_not_using_indexes'")) - printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (mysqli_get_server_version($link) >= 50111) { + // this might cause a warning - no index used + if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_queries_not_using_indexes'")) +printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if (!$row = mysqli_fetch_assoc($res)) - printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (!$row = mysqli_fetch_assoc($res)) +printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - $log_queries_not_using_indexes = ('ON' == $row['Value']); + $log_queries_not_using_indexes = ('ON' == $row['Value']); - if ($log_slow_queries && $log_queries_not_using_indexes) { + if ($log_slow_queries && $log_queries_not_using_indexes) { - for ($i = 100; $i < 2; $i++) { -if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES ($i, 'z')")) - printf("[022 - %d] [%d] %s\n", $i - 99, mysqli_errno($link), mysqli_error($link)); - } +for ($i = 100; $i < 2; $i++) { + if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES ($i, 'z')")) + printf("[022 - %d] [%d] %s\n", $i - 99, mysqli_errno($link), mysqli_error($link)); +} - // this might cause a warning - no index used - if (!$res = @mysqli_query($link, "SELECT id, label FROM test WHERE id = 1323")) -printf("[023] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); +// this might cause a warning - no index used +if (!$res = @mysqli_query($link, "SELECT id, label FROM test WHERE id = 1323")) + printf("[023] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - mysqli_free_result($res); +mysqli_free_result($res); + } } } Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_report.phpt === --- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_report.phpt 2012-03-14 14:05:54 UTC (rev 324241) +++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_report.phpt 2012-03-14 14:55:09 UTC (rev 324242) @@ -194,37 +194,39 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[017] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); - // this might cause a warning - no index used - if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_slow_queries'")) - printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (mysqli_get_server_version($link) <= 50600) { + // this might cause a warning - no index used + if (!$res = @mysqli_query($link, "SHOW VARIABLES LIKE 'log_slow_queries'")) + printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if (!$row = mysqli_fetch_assoc($res)) - printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (!$row = mysqli_fetch_assoc($res)) + printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - $log_slow_query = ('ON' == $row['Value']); + $log_slow_query = ('ON' == $row['Value']); - if (mysqli_ge
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt branches/PHP
sixd Mon, 12 Mar 2012 18:08:34 + Revision: http://svn.php.net/viewvc?view=revision&revision=324165 Log: Test portability and coverage changes Changed paths: U php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.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/drcp_privileged.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_raw_2.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/drcp_privileged.phpt U php/php-src/trunk/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/trunk/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/trunk/ext/oci8/tests/bind_raw_2.phpt U php/php-src/trunk/ext/oci8/tests/bug43497_92.phpt U php/php-src/trunk/ext/oci8/tests/drcp_privileged.phpt Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -4,6 +4,7 @@ true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- + +--EXPECT-- +string(32) "88b274d7a257ac6f70435b83abd4e26e" +int(300) +Done Property changes on: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native 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 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -5,8 +5,12 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -if (preg_match('/Unknown/', oci_client_version()) != 1) { -die("skip expected output only valid with Oracle 9gR2 clients"); +ob_start(); +phpinfo(INFO_MODULES); +$phpinfo = ob_get_clean(); +$iv = preg_match('/Oracle .*Version => (9\.2)/', $phpinfo); +if ($iv != 1) { +die ("skip tests a feature that works only with Oracle 9iR2 client"); } ?> --FILE-- Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/drcp_privileged.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/drcp_privileged.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/drcp_privileged.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -3,11 +3,14 @@ --SKIPIF-- --INI-- Modified: php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bdouble.phpt === --- php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -4,6 +4,7 @@ true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- + +--EXPECT-- +string(32) "88b274d7a257ac6f70435b83abd4e26e" +int(300) +Done Property changes on: php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_raw_2.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + n
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/sta
iliaaMon, 12 Mar 2012 16:53:07 + Revision: http://svn.php.net/viewvc?view=revision&revision=324163 Log: Fixed bug #60222 (time_nanosleep() does validate input params). Bug: https://bugs.php.net/60222 (Open) time_nanosleep won't throw a warning for negative second Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c A php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c A php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt U php/php-src/trunk/ext/standard/basic_functions.c A php/php-src/trunk/ext/standard/tests/time/bug60222.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-12 16:53:07 UTC (rev 324163) @@ -24,6 +24,7 @@ . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia) . Fixed bug #60227 (header() cannot detect the multi-line header with CR). (rui, Gustavo) + . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia) . Fixed bug #52719 (array_walk_recursive crashes if third param of the function is by reference). (Nikita Popov) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) 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 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-12 16:53:07 UTC (rev 324163) @@ -4497,6 +4497,15 @@ return; } + if (tv_sec < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds value must be greater than 0"); + RETURN_FALSE; + } + if (tv_nsec < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The nanoseconds value must be greater than 0"); + RETURN_FALSE; + } + php_req.tv_sec = (time_t) tv_sec; php_req.tv_nsec = tv_nsec; if (!nanosleep(&php_req, &php_rem)) { Added: php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt 2012-03-12 16:53:07 UTC (rev 324163) @@ -0,0 +1,15 @@ +--TEST-- +Bug #60222 (time_nanosleep() does validate input params) +--FILE-- + +===DONE=== +--EXPECTF-- +Warning: time_nanosleep(): The seconds value must be greater than 0 in %s on line %d +bool(false) + +Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in %s on line %d +bool(false) +===DONE=== Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-12 16:53:07 UTC (rev 324163) @@ -87,6 +87,7 @@ - Standard: . Fixed memory leak in substr_replace. (Pierrick) . Make max_file_uploads ini directive settable outside of php.ini (Rasmus) + . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia) . Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths). (Ilia) Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 16:53:07 UTC (rev 324163) @@ -4432,6 +4432,15 @@ return; } + if (tv_sec < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The seconds value must be greater than 0"); + RETURN_FALSE; + } + if (tv_nsec < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The nanoseconds value must be greater than 0"); + RETURN_FALSE; + } + php_req.tv_sec = (time_t) tv_sec; php_req.tv_nsec = tv_nsec; if (!nanosleep(&php_req, &php_rem)) { Added: php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt 2012-03-12 16:53:07 UTC (rev 324163) @@ -0,0 +1,15 @@ +--TEST-- +Bug #60222 (t
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/tests/bug61273.phpt branches/PHP_5_4/Zend/tests/bug61273.phpt trunk/Zend/tests/bug61273.phpt
laruence Mon, 12 Mar 2012 14:52:02 + Revision: http://svn.php.net/viewvc?view=revision&revision=324159 Log: reduce memory usage Changed paths: U php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt U php/php-src/trunk/Zend/tests/bug61273.phpt Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, "*"); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function(&$a) {}, $args); echo strval("okey"); --EXPECTF-- Modified: php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, "*"); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function(&$a) {}, $args); echo strval("okey"); --EXPECTF-- Modified: php/php-src/trunk/Zend/tests/bug61273.phpt === --- php/php-src/trunk/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/trunk/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, "*"); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function(&$a) {}, $args); echo strval("okey"); --EXPECTF-- -- 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/Zend/tests/bug60569.phpt branches/PHP_5_3/Zend/zend_exceptions.c branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60569.phpt bra
iliaaSun, 11 Mar 2012 18:15:13 + Revision: http://svn.php.net/viewvc?view=revision&revision=324112 Log: Fixed bug #60569 (Nullbyte truncates Exception $message). Bug: https://bugs.php.net/60569 (Open) Nullbyte truncates Exception $message. Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt U php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt U php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c A php/php-src/trunk/Zend/tests/bug60569.phpt U php/php-src/trunk/Zend/zend_exceptions.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 15:56:56 UTC (rev 324111) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 18:15:13 UTC (rev 324112) @@ -21,6 +21,7 @@ . Fixed bug #60825 (Segfault when running symfony 2 tests). (Dmitry, Laruence) . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) + . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia) . Fixed bug #60227 (header() cannot detect the multi-line header with CR). (rui, Gustavo) . Fixed bug #52719 (array_walk_recursive crashes if third param of the Added: php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt === (Binary files differ) Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt ___ Added: svn:mime-type + application/octet-stream Modified: php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c === --- php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c 2012-03-11 15:56:56 UTC (rev 324111) +++ php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c 2012-03-11 18:15:13 UTC (rev 324112) @@ -192,7 +192,7 @@ object = getThis(); if (message) { - zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } if (code) { Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-11 15:56:56 UTC (rev 324111) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-11 18:15:13 UTC (rev 324112) @@ -32,6 +32,7 @@ error). (Stefan) . Fixed bug #60573 (type hinting with "self" keyword causes weird errors). (Laruence) + . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia) . Fixed bug #52719 (array_walk_recursive crashes if third param of the function is by reference). (Nikita Popov) Added: php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt === (Binary files differ) Property changes on: php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt ___ Added: svn:mime-type + application/octet-stream Modified: php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c === --- php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c 2012-03-11 15:56:56 UTC (rev 324111) +++ php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c 2012-03-11 18:15:13 UTC (rev 324112) @@ -205,7 +205,7 @@ object = getThis(); if (message) { - zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } if (code) { Added: php/php-src/trunk/Zend/tests/bug60569.phpt === (Binary files differ) Property changes on: php/php-src/trunk/Zend/tests/bug60569.phpt ___ Added: svn:mime-type + application/octet-stream Modified: php/php-src/trunk/Zend/zend_exceptions.c === --- php/php-src/trunk/Zend/zend_exceptions.c2012-03-11 15:56:56 UTC (rev 324111) +++ php/php-src/trunk/Zend/zend_exceptions.c2012-03-11 18:15:13 UTC (rev 324112) @@ -205,7 +205,7 @@ object = getThis(); if (message) { - zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_directory.c branches/PHP_5_3/ext/spl/tests/SplFileInfo_001.phpt branches/PHP_5_4/ext/spl/spl_directory.c branches/PHP_5_
felipe Sun, 11 Mar 2012 15:42:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=324110 Log: - Fixed memory leak when calling SplFileInfo's constructor twice Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c A php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_001.phpt U php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c A php/php-src/branches/PHP_5_4/ext/spl/tests/SplFileInfo_001.phpt U php/php-src/trunk/ext/spl/spl_directory.c A php/php-src/trunk/ext/spl/tests/SplFileInfo_001.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 15:31:19 UTC (rev 324109) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 15:42:57 UTC (rev 324110) @@ -71,6 +71,7 @@ chunksize length line is > 10 bytes). (Ilia) - SPL + . Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe) . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) . Fixed bug #61326 (ArrayObject comparison). (Gustavo) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c2012-03-11 15:31:19 UTC (rev 324109) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c2012-03-11 15:42:57 UTC (rev 324110) @@ -366,6 +366,10 @@ void spl_filesystem_info_set_filename(spl_filesystem_object *intern, char *path, int len, int use_copy TSRMLS_DC) /* {{{ */ { char *p1, *p2; + + if (intern->file_name) { + efree(intern->file_name); + } intern->file_name = use_copy ? estrndup(path, len) : path; intern->file_name_len = len; @@ -386,7 +390,10 @@ } else { intern->_path_len = 0; } - + + if (intern->_path) { + efree(intern->_path); + } intern->_path = estrndup(path, intern->_path_len); } /* }}} */ Added: php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_001.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_001.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/SplFileInfo_001.phpt 2012-03-11 15:42:57 UTC (rev 324110) @@ -0,0 +1,11 @@ +--TEST-- +Testing SplFileInfo calling the constructor twice +--FILE-- +__construct(1); + +echo "done!\n"; +?> +--EXPECT-- +done! Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2012-03-11 15:31:19 UTC (rev 324109) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2012-03-11 15:42:57 UTC (rev 324110) @@ -376,6 +376,10 @@ void spl_filesystem_info_set_filename(spl_filesystem_object *intern, char *path, int len, int use_copy TSRMLS_DC) /* {{{ */ { char *p1, *p2; + + if (intern->file_name) { + efree(intern->file_name); + } intern->file_name = use_copy ? estrndup(path, len) : path; intern->file_name_len = len; @@ -396,7 +400,10 @@ } else { intern->_path_len = 0; } - + + if (intern->_path) { + efree(intern->_path); + } intern->_path = estrndup(path, intern->_path_len); } /* }}} */ Added: php/php-src/branches/PHP_5_4/ext/spl/tests/SplFileInfo_001.phpt === --- php/php-src/branches/PHP_5_4/ext/spl/tests/SplFileInfo_001.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/spl/tests/SplFileInfo_001.phpt 2012-03-11 15:42:57 UTC (rev 324110) @@ -0,0 +1,11 @@ +--TEST-- +Testing SplFileInfo calling the constructor twice +--FILE-- +__construct(1); + +echo "done!\n"; +?> +--EXPECT-- +done! Modified: php/php-src/trunk/ext/spl/spl_directory.c === --- php/php-src/trunk/ext/spl/spl_directory.c 2012-03-11 15:31:19 UTC (rev 324109) +++ php/php-src/trunk/ext/spl/spl_directory.c 2012-03-11 15:42:57 UTC (rev 324110) @@ -376,6 +376,10 @@ void spl_filesystem_info_set_filename(spl_filesystem_object *intern, char *path, int len, int use_copy TSRMLS_DC) /* {{{ */ { char *p1, *p2; + + if (intern->file_name) { + efree(intern->file_name); + } intern->file_name = use_copy ? estrndup(path, len) : path; intern->file_name_len = len; @@ -396,7 +400,10 @@ } else { intern->_path_len = 0; } - + + if (intern->_path) { + efree(intern->_path); + } intern->_path = estrndup(path, intern->_path_len); } /* }}} */ Added:
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ zend_execute_API.c
laruence Sun, 11 Mar 2012 15:31:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=324109 Log: Typo when merging from trunk Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c2012-03-11 15:28:31 UTC (rev 324108) +++ php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c2012-03-11 15:31:19 UTC (rev 324109) @@ -877,7 +877,7 @@ if (fci->no_separation && !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) { - if (i || UNEXPECTED(UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == EG(argument_stack)->top))) { + if (i || UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == EG(argument_stack)->top)) { /* hack to clean up the stack */ zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC); zend_vm_stack_clear_multiple(TSRMLS_C); -- 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/Zend/tests/bug61273.phpt branches/PHP_5_3/Zend/zend_execute_API.c branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug61273.phpt br
laruence Sun, 11 Mar 2012 15:28:31 + Revision: http://svn.php.net/viewvc?view=revision&revision=324108 Log: Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) Bug: https://bugs.php.net/61273 (Assigned) call_user_func_array with more than 16333 arguments leaks / crashes Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt U php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt U php/php-src/branches/PHP_5_4/Zend/zend_execute_API.c A php/php-src/trunk/Zend/tests/bug61273.phpt U php/php-src/trunk/Zend/zend_execute_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 15:12:28 UTC (rev 324107) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 15:28:31 UTC (rev 324108) @@ -3,6 +3,8 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61273 (call_user_func_array with more than 16333 arguments +leaks / crashes). (Laruence) . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt 2012-03-11 15:28:31 UTC (rev 324108) @@ -0,0 +1,15 @@ +--TEST-- +Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) +--FILE-- +no_separation && !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) { - if(i) { + if (i || UNEXPECTED(UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == EG(argument_stack)->top))) { /* hack to clean up the stack */ zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC); zend_vm_stack_clear_multiple(TSRMLS_C); Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-11 15:12:28 UTC (rev 324107) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-11 15:28:31 UTC (rev 324108) @@ -8,6 +8,8 @@ . "Connection: close" instead of "Connection: closed" (Gustavo) - Core: + . Fixed bug #61273 (call_user_func_array with more than 16333 arguments +leaks / crashes). (Laruence) . Fixed bug #61225 (Incorect lexing of 0b00*+). (Pierrick) . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita Added: php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt 2012-03-11 15:28:31 UTC (rev 324108) @@ -0,0 +1,15 @@ +--TEST-- +Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) +--FILE-- +no_separation && !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) { - if(i) { + if (i || UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (EG(argument_stack)->top))) { /* hack to clean up the stack */ zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC); zend_vm_stack_clear_multiple(TSRMLS_C); Added: php/php-src/trunk/Zend/tests/bug61273.phpt === --- php/php-src/trunk/Zend/tests/bug61273.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug61273.phpt 2012-03-11 15:28:31 UTC (rev 324108) @@ -0,0 +1,15 @@ +--TEST-- +Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) +--FILE-- +no_separation && !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) { - if(i) { + if (i || UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (EG(argument_stack)->top))) { /* hack to clean up the stack */
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/.gdbinit branches/PHP_5_4/.gdbinit trunk/.gdbinit
laruence Sun, 11 Mar 2012 15:12:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=324107 Log: Fix wrong type in the marco of fetching thread globals Changed paths: U php/php-src/branches/PHP_5_3/.gdbinit U php/php-src/branches/PHP_5_4/.gdbinit U php/php-src/trunk/.gdbinit Modified: php/php-src/branches/PHP_5_3/.gdbinit === --- php/php-src/branches/PHP_5_3/.gdbinit 2012-03-11 14:44:07 UTC (rev 324106) +++ php/php-src/branches/PHP_5_3/.gdbinit 2012-03-11 15:12:28 UTC (rev 324107) @@ -1,8 +1,8 @@ define executor_globals if basic_functions_module.zts set $tsrm_ls = ts_resource_ex(0, 0) - set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) - set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) + set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1]) + set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) else set $eg = executor_globals set $cg = compiler_globals Modified: php/php-src/branches/PHP_5_4/.gdbinit === --- php/php-src/branches/PHP_5_4/.gdbinit 2012-03-11 14:44:07 UTC (rev 324106) +++ php/php-src/branches/PHP_5_4/.gdbinit 2012-03-11 15:12:28 UTC (rev 324107) @@ -1,8 +1,8 @@ define executor_globals if basic_functions_module.zts set $tsrm_ls = ts_resource_ex(0, 0) - set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) - set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) + set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1]) + set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) else set $eg = executor_globals set $cg = compiler_globals Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2012-03-11 14:44:07 UTC (rev 324106) +++ php/php-src/trunk/.gdbinit 2012-03-11 15:12:28 UTC (rev 324107) @@ -1,8 +1,8 @@ define executor_globals if basic_functions_module.zts set $tsrm_ls = ts_resource_ex(0, 0) - set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) - set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) + set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1]) + set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) else set $eg = executor_globals set $cg = compiler_globals -- 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/readline/readline.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/readline/readline.c trunk/ext/readline/readline.c
laruence Sun, 11 Mar 2012 09:19:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=324104 Log: Fixed bug #61088 (Memory leak in readline_callback_handler_install). Bug: https://bugs.php.net/61088 (Assigned) Memory leak in readline_callback_handler_install Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/readline/readline.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/readline/readline.c U php/php-src/trunk/ext/readline/readline.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 09:12:25 UTC (rev 324103) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 09:19:38 UTC (rev 324104) @@ -57,6 +57,10 @@ - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) +- Readline: + . Fixed bug #61088 (Memory leak in readline_callback_handler_install). +(Nikic, Laruence) + - SOAP . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no Modified: php/php-src/branches/PHP_5_3/ext/readline/readline.c === --- php/php-src/branches/PHP_5_3/ext/readline/readline.c2012-03-11 09:12:25 UTC (rev 324103) +++ php/php-src/branches/PHP_5_3/ext/readline/readline.c2012-03-11 09:19:38 UTC (rev 324104) @@ -561,9 +561,8 @@ FREE_ZVAL(_prepped_callback); } - MAKE_STD_ZVAL(_prepped_callback); - *_prepped_callback = *callback; - zval_copy_ctor(_prepped_callback); + ALLOC_ZVAL(_prepped_callback); + MAKE_COPY_ZVAL(&callback, _prepped_callback); rl_callback_handler_install(prompt, php_rl_callback_handler); Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-11 09:12:25 UTC (rev 324103) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-11 09:19:38 UTC (rev 324104) @@ -46,6 +46,10 @@ . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled). (Johannes) +- Readline: + . Fixed bug #61088 (Memory leak in readline_callback_handler_install). +(Nikic, Laruence) + - Session . Fixed bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()). (Ilia) Modified: php/php-src/branches/PHP_5_4/ext/readline/readline.c === --- php/php-src/branches/PHP_5_4/ext/readline/readline.c2012-03-11 09:12:25 UTC (rev 324103) +++ php/php-src/branches/PHP_5_4/ext/readline/readline.c2012-03-11 09:19:38 UTC (rev 324104) @@ -576,9 +576,8 @@ FREE_ZVAL(_prepped_callback); } - MAKE_STD_ZVAL(_prepped_callback); - *_prepped_callback = *callback; - zval_copy_ctor(_prepped_callback); + ALLOC_ZVAL(_prepped_callback); + MAKE_COPY_ZVAL(&callback, _prepped_callback); rl_callback_handler_install(prompt, php_rl_callback_handler); Modified: php/php-src/trunk/ext/readline/readline.c === --- php/php-src/trunk/ext/readline/readline.c 2012-03-11 09:12:25 UTC (rev 324103) +++ php/php-src/trunk/ext/readline/readline.c 2012-03-11 09:19:38 UTC (rev 324104) @@ -576,9 +576,8 @@ FREE_ZVAL(_prepped_callback); } - MAKE_STD_ZVAL(_prepped_callback); - *_prepped_callback = *callback; - zval_copy_ctor(_prepped_callback); + ALLOC_ZVAL(_prepped_callback); + MAKE_COPY_ZVAL(&callback, _prepped_callback); rl_callback_handler_install(prompt, php_rl_callback_handler); -- 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
laruence Sun, 11 Mar 2012 09:06:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=324100 Log: Sorry for wrong order again. 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 2012-03-11 09:02:00 UTC (rev 324099) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 09:06:12 UTC (rev 324100) @@ -38,10 +38,10 @@ . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes). - PDO_mysql + . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't +always work). (Johannes) . Fixed bug #61194 (PDO should export compression flag with myslqnd). (Johannes) - . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't -always work). (Johannes) - PDO_pgsql . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed -- 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 PHP_5_4/NEWS
laruence Sun, 11 Mar 2012 09:02:00 + Revision: http://svn.php.net/viewvc?view=revision&revision=324099 Log: Re-order them according to README.SVN-RULES Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 08:56:14 UTC (rev 324098) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 09:02:00 UTC (rev 324099) @@ -38,10 +38,10 @@ . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes). - PDO_mysql + . Fixed bug #61194 (PDO should export compression flag with myslqnd). +(Johannes) . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work). (Johannes) - . Fixed bug #61194 (PDO should export compression flag with myslqnd). -(Johannes) - PDO_pgsql . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed @@ -59,14 +59,14 @@ - SOAP . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no +User-Agent header). (carloschilazo at gmail dot com) . Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes). (Ilia) - . Fixed bug #60887 (SoapClient ignores user_agent option and sends no -User-Agent header). (carloschilazo at gmail dot com) - SPL + . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) . Fixed bug #61326 (ArrayObject comparison). (Gustavo) - . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) - SQLite3 extension: . Add createCollation() method. (Brad Dewar) @@ -86,20 +86,20 @@ (Gustavo) . Fixed bug #61115 (stream related segfault on fatal error in php_stream_context_link). (Gustavo) - . Fixed bug #60106 (stream_socket_server silently truncates long unix -socket paths). (Ilia) - . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not -detected together with the last read). (Gustavo) . Fixed bug #60817 (stream_get_line() reads from stream even when there is already sufficient data buffered). stream_get_line() now behaves more like fgets(), as is documented. (Gustavo) + . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not +detected together with the last read). (Gustavo) + . Fixed bug #60106 (stream_socket_server silently truncates long unix +socket paths). (Ilia) - Tidy: . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra) - XMLRPC: + . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov) . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) - . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov) - Zlib: . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic) Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-11 08:56:14 UTC (rev 324098) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-11 09:02:00 UTC (rev 324099) @@ -3,9 +3,9 @@ ?? ??? 2012, PHP 5.4.1 RC1 - CLI Server: - . "Connection: close" instead of "Connection: closed" (Gustavo) . Implemented FR #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router). (Laruence) + . "Connection: close" instead of "Connection: closed" (Gustavo) - Core: . Fixed bug #61225 (Incorect lexing of 0b00*+). (Pierrick) @@ -51,20 +51,20 @@ SessionHandler::write()). (Ilia) - SOAP + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no +User-Agent header). (carloschilazo at gmail dot com) . Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes). (Ilia) - . Fixed bug #60887 (SoapClient ignores user_agent option and sends no -User-Agent header). (carloschilazo at gmail dot com) - PDO . Fixed bug #61292 (Segfault while calling a method on an overloaded PDO object). (Laruence) - PDO_mysql + . Fixed bug #61194 (PDO should export compression flag with myslqnd). +(Johannes) . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work). (Johannes) - . Fixed bug #61194 (PDO should export compression flag with myslqnd). -(Johannes) - Phar . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL -- 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 PHP_5_4/NEWS
laruence Sun, 11 Mar 2012 08:34:06 + Revision: http://svn.php.net/viewvc?view=revision&revision=324095 Log: Oops, sorry for my poor english Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 08:30:30 UTC (rev 324094) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 08:34:06 UTC (rev 324095) @@ -66,7 +66,7 @@ - SPL . Fixed bug #61326 (ArrayObject comparison). (Gustavo) - . Fixed bug #61347 (inconsist isset behavior of Arrayobject). (Laruence) + . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) - SQLite3 extension: . Add createCollation() method. (Brad Dewar) Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-11 08:30:30 UTC (rev 324094) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-11 08:34:06 UTC (rev 324095) @@ -73,7 +73,7 @@ ReflectionMethod::invokeArgs()). (Laruence) - SPL: - . Fixed bug #61347 (inconsist isset behavior of Arrayobject). (Laruence) + . Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence) - Standard: . Fixed memory leak in substr_replace. (Pierrick) -- 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/spl/tests/ bug60082.phpt
laruence Sun, 11 Mar 2012 08:30:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=324094 Log: Fix test Changed paths: U php/php-src/branches/PHP_5_3/ext/spl/tests/bug60082.phpt Modified: php/php-src/branches/PHP_5_3/ext/spl/tests/bug60082.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug60082.phpt2012-03-11 08:27:55 UTC (rev 324093) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug60082.phpt2012-03-11 08:30:30 UTC (rev 324094) @@ -16,4 +16,6 @@ ===DONE=== --EXPECTF-- +Deprecated: Call-time pass-by-reference has been deprecated in %sbug60082.php on line %d + Fatal error: main(): Nesting level too deep - recursive dependency? in %sbug60082.php on line %d -- 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/spl/spl_array.c branches/PHP_5_3/ext/spl/tests/bug61347.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/spl/spl_array.c branches
laruence Sun, 11 Mar 2012 08:27:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=324093 Log: Fixed bug #61347 (inconsist isset behavior of Arrayobject) Bug: https://bugs.php.net/61347 (Open) inconsist isset behavior of Arrayobject Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_array.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug61347.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/spl/spl_array.c A php/php-src/branches/PHP_5_4/ext/spl/tests/bug61347.phpt U php/php-src/trunk/ext/spl/spl_array.c A php/php-src/trunk/ext/spl/tests/bug61347.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-11 04:20:25 UTC (rev 324092) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-11 08:27:55 UTC (rev 324093) @@ -66,6 +66,7 @@ - SPL . Fixed bug #61326 (ArrayObject comparison). (Gustavo) + . Fixed bug #61347 (inconsist isset behavior of Arrayobject). (Laruence) - SQLite3 extension: . Add createCollation() method. (Brad Dewar) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_array.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_array.c 2012-03-11 04:20:25 UTC (rev 324092) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_array.c 2012-03-11 08:27:55 UTC (rev 324093) @@ -578,49 +578,46 @@ } switch(Z_TYPE_P(offset)) { - case IS_STRING: - if (check_empty) { - if (zend_symtable_find(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &tmp) != FAILURE) { -switch (check_empty) { - case 0: - return Z_TYPE_PP(tmp) != IS_NULL; - case 2: - return 1; - default: - return zend_is_true(*tmp); + case IS_STRING: + { +HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); +if (zend_symtable_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &tmp) != FAILURE) { + switch (check_empty) { + case 0: + return Z_TYPE_PP(tmp) != IS_NULL; + case 2: + return 1; + default: + return zend_is_true(*tmp); + } } +return 0; } - return 0; - } else { - return zend_symtable_exists(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1); - } - case IS_DOUBLE: - case IS_RESOURCE: - case IS_BOOL: - case IS_LONG: - if (offset->type == IS_DOUBLE) { - index = (long)Z_DVAL_P(offset); - } else { - index = Z_LVAL_P(offset); - } - if (check_empty) { - HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); - if (zend_hash_index_find(ht, index, (void **)&tmp) != FAILURE) { -switch (check_empty) { - case 0: - return Z_TYPE_PP(tmp) != IS_NULL; - case 2: - return 1; - default: - return zend_is_true(*tmp); + case IS_DOUBLE: + case IS_RESOURCE: + case IS_BOOL: + case IS_LONG: + { +HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); +if (offset->type == IS_DOUBLE) { + index = (long)Z_DVAL_P(offset); +} else { + index = Z_LVAL_P(offset); } +if (zend_hash_index_find(ht, index, (void **)&tmp) != FAILURE) { + switch (check_empty) { + case 0: + return Z_TYPE_PP(tmp) != IS_NULL; + case 2: + return 1; + default: + return zend_is_true(*tmp); + } +} +return 0; } - return 0; - } else { - return zend_hash_index_exists(spl_array_get_hash_table(intern, 0 TSRMLS_CC), index); - } - default: - zend_error(E_WARNING, "Illegal offset type"); + default: + zend_error(E_WARNING, "Illegal offset type"); } return 0; } /* }}} */ Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug61347.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug61347.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug61347.phpt 2012-03-11 08:27:55 UTC (rev 324093) @@ -0,0 +1,40 @@ +--TEST-- +Bug #61347 (inconsist isset behavior of Arrayobject) +--FILE-- + NULL, 37 => NULL); +var_dump(isset($a['b'])); //false + +$b = new ArrayObject($a); +var_dump(isset($b['b'])); //false +var_dump(isset($b[37])); //false +var_dump(isset($b['no_exists'])); //false +var_dump(empty($b['b'])); //true +var_dump(empty($b[37])); //true + +var_dump(array_key_exists('b', $b)); //true +var_dump($b['b']); + +$a = array('b' => '', 37 => false); +$b = new ArrayObject($a); +var_dump(isset($b['b'])); //true +var_dump(isset($b[37])); //true +var_dump(isset($b['no_exists'])); //false +var_dump(empty($b['b'])); //true +var_dump(empty($b[37])); //true + + +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(true) +NULL +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) Modifi
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_array.c branches/PHP_5_3/ext/spl/tests/bug61326.phpt branches/PHP_5_4/ext/spl/spl_array.c branches/PHP_5_4/ext/spl/tests
cataphract Sat, 10 Mar 2012 17:19:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=324082 Log: - Fixed bug #61326 (ArrayObject comparison). Bug: https://bugs.php.net/61326 (Assigned) ArrayObject comparison Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_array.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug61326.phpt U php/php-src/branches/PHP_5_4/ext/spl/spl_array.c A php/php-src/branches/PHP_5_4/ext/spl/tests/bug61326.phpt U php/php-src/trunk/ext/spl/spl_array.c A php/php-src/trunk/ext/spl/tests/bug61326.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-10 16:24:37 UTC (rev 324081) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-10 17:19:39 UTC (rev 324082) @@ -47,6 +47,9 @@ . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed rows on postgresql >= 9). (ben dot pineau at gmail dot com) +- PDO_Sqlite extension: + . Add createCollation support. (Damien) + - Phar: . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic) @@ -60,13 +63,13 @@ chunksize length line is > 10 bytes). (Ilia) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) - + +- SPL + . Fixed bug #61326 (ArrayObject comparison). (Gustavo) + - SQLite3 extension: . Add createCollation() method. (Brad Dewar) -- PDO_Sqlite extension: - . Add createCollation support. (Damien) - - Reflection: . Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()). (Laruence) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_array.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_array.c 2012-03-10 16:24:37 UTC (rev 324081) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_array.c 2012-03-10 17:19:39 UTC (rev 324082) @@ -836,6 +836,30 @@ std_object_handlers.unset_property(object, member TSRMLS_CC); } /* }}} */ +static int spl_array_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */ +{ + HashTable *ht1, + *ht2; + spl_array_object *intern1, + *intern2; + int result = 0; + zvaltemp_zv; + + intern1 = (spl_array_object*)zend_object_store_get_object(o1 TSRMLS_CC); + intern2 = (spl_array_object*)zend_object_store_get_object(o2 TSRMLS_CC); + ht1 = spl_array_get_hash_table(intern1, 0 TSRMLS_CC); + ht2 = spl_array_get_hash_table(intern2, 0 TSRMLS_CC); + + zend_compare_symbol_tables(&temp_zv, ht1, ht2 TSRMLS_CC); + result = (int)Z_LVAL(temp_zv); + /* if we just compared std.properties, don't do it again */ + if (result == 0 && + !(ht1 == intern1->std.properties && ht2 == intern2->std.properties)) { + result = std_object_handlers.compare_objects(o1, o2 TSRMLS_CC); + } + return result; +} /* }}} */ + static int spl_array_skip_protected(spl_array_object *intern, HashTable *aht TSRMLS_DC) /* {{{ */ { char *string_key; @@ -2003,6 +2027,8 @@ spl_handler_ArrayObject.has_property = spl_array_has_property; spl_handler_ArrayObject.unset_property = spl_array_unset_property; + spl_handler_ArrayObject.compare_objects = spl_array_compare_objects; + REGISTER_SPL_STD_CLASS_EX(ArrayIterator, spl_array_object_new, spl_funcs_ArrayIterator); REGISTER_SPL_IMPLEMENTS(ArrayIterator, Iterator); REGISTER_SPL_IMPLEMENTS(ArrayIterator, ArrayAccess); Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug61326.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug61326.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug61326.phpt 2012-03-10 17:19:39 UTC (rev 324082) @@ -0,0 +1,17 @@ +--TEST-- +Bug #61326: ArrayObject comparison +--FILE-- +foo = 'bar'; +var_dump($aobj1 == $aobj3); +--EXPECT-- +bool(false) +bool(true) +bool(false) Property changes on: php/php-src/branches/PHP_5_3/ext/spl/tests/bug61326.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_array.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_array.c 2012-03-10 16:24:37 UTC (rev 324081) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_array.c 2012-03-10 17:19:39 UTC (rev 324082) @@ -862,6 +862,30 @@ std_object_handlers.unset_property(object, member, key TSRMLS_CC); } /* }}} */ +static int spl_array_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */ +{ + HashTable *ht1, + *ht2; + spl_array_object *intern1, + *intern2; + int result = 0; + zvaltemp_zv; + + intern1 = (spl_array_object*)zend_object_store_get_object(o1 TSRMLS_CC); + intern2 = (
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/run-tests.php PHP_5_4/run-tests.php
mike Fri, 09 Mar 2012 19:51:09 + Revision: http://svn.php.net/viewvc?view=revision&revision=324068 Log: merge 322758 (detect a php-cgi which is a sibling of php cli) Changed paths: _U php/php-src/branches/PHP_5_3/ U php/php-src/branches/PHP_5_3/run-tests.php _U php/php-src/branches/PHP_5_4/ U php/php-src/branches/PHP_5_4/run-tests.php Property changes on: php/php-src/branches/PHP_5_3 ___ Modified: svn:mergeinfo - /php/php-src/trunk:284726,305015,305018-305019 + /php/php-src/trunk:284726,305015,305018-305019,322758 Modified: php/php-src/branches/PHP_5_3/run-tests.php === --- php/php-src/branches/PHP_5_3/run-tests.php 2012-03-09 18:38:18 UTC (rev 324067) +++ php/php-src/branches/PHP_5_3/run-tests.php 2012-03-09 19:51:09 UTC (rev 324068) @@ -1357,6 +1357,9 @@ } else if (file_exists("./sapi/cgi/php-cgi")) { $old_php = $php; $php = realpath("./sapi/cgi/php-cgi") . ' -C '; + } else if (file_exists(dirname($php) . "/php-cgi")) { + $old_php = $php; + $php = realpath(dirname($php) . "/php-cgi") . ' -C '; } else { show_result('SKIP', $tested, $tested_file, "reason: CGI not available"); if ($JUNIT) { Property changes on: php/php-src/branches/PHP_5_4 ___ Modified: svn:mergeinfo - /php/php-src/trunk:284726,322419,322421,322423,322963 + /php/php-src/trunk:284726,322419,322421,322423,322758,322963 Modified: php/php-src/branches/PHP_5_4/run-tests.php === --- php/php-src/branches/PHP_5_4/run-tests.php 2012-03-09 18:38:18 UTC (rev 324067) +++ php/php-src/branches/PHP_5_4/run-tests.php 2012-03-09 19:51:09 UTC (rev 324068) @@ -1357,6 +1357,9 @@ } else if (file_exists("./sapi/cgi/php-cgi")) { $old_php = $php; $php = realpath("./sapi/cgi/php-cgi") . ' -C '; + } else if (file_exists(dirname($php) . "/php-cgi")) { + $old_php = $php; + $php = realpath(dirname($php) . "/php-cgi") . ' -C '; } else { show_result('SKIP', $tested, $tested_file, "reason: CGI not available"); if ($JUNIT) { -- 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/soap/php_http.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_http.c trunk/ext/soap/php_http.c
iliaaThu, 08 Mar 2012 20:14:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=324027 Log: Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes). Bugs: https://bugs.php.net/60842 (Open) CR+LF bug on chunk_size https://bugs.php.net/51775 (Feedback) Chunked response parsing error Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/soap/php_http.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/soap/php_http.c U php/php-src/trunk/ext/soap/php_http.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-08 19:31:57 UTC (rev 324026) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-08 20:14:26 UTC (rev 324027) @@ -56,6 +56,8 @@ - SOAP . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) + . Fixed bug #60842, #51775 (Chunked response parsing error when +chunksize length line is > 10 bytes). (Ilia) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) Modified: php/php-src/branches/PHP_5_3/ext/soap/php_http.c === --- php/php-src/branches/PHP_5_3/ext/soap/php_http.c2012-03-08 19:31:57 UTC (rev 324026) +++ php/php-src/branches/PHP_5_3/ext/soap/php_http.c2012-03-08 20:14:26 UTC (rev 324027) @@ -1311,15 +1311,15 @@ } if (header_chunked) { - char ch, done, chunk_size[10], headerbuf[8192]; + char ch, done, headerbuf[8192]; done = FALSE; while (!done) { int buf_size = 0; - php_stream_gets(stream, chunk_size, sizeof(chunk_size)); - if (sscanf(chunk_size, "%x", &buf_size) > 0 ) { + php_stream_gets(stream, headerbuf, sizeof(headerbuf)); + if (sscanf(headerbuf, "%x", &buf_size) > 0 ) { if (buf_size > 0) { int len_size = 0; Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-08 19:31:57 UTC (rev 324026) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-08 20:14:26 UTC (rev 324027) @@ -49,6 +49,8 @@ SessionHandler::write()). (Ilia) - SOAP + . Fixed bug #60842, #51775 (Chunked response parsing error when +chunksize length line is > 10 bytes). (Ilia) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) Modified: php/php-src/branches/PHP_5_4/ext/soap/php_http.c === --- php/php-src/branches/PHP_5_4/ext/soap/php_http.c2012-03-08 19:31:57 UTC (rev 324026) +++ php/php-src/branches/PHP_5_4/ext/soap/php_http.c2012-03-08 20:14:26 UTC (rev 324027) @@ -1313,15 +1313,15 @@ } if (header_chunked) { - char ch, done, chunk_size[10], headerbuf[8192]; + char ch, done, headerbuf[8192]; done = FALSE; while (!done) { int buf_size = 0; - php_stream_gets(stream, chunk_size, sizeof(chunk_size)); - if (sscanf(chunk_size, "%x", &buf_size) > 0 ) { + php_stream_gets(stream, headerbuf, sizeof(headerbuf)); + if (sscanf(headerbuf, "%x", &buf_size) > 0 ) { if (buf_size > 0) { int len_size = 0; Modified: php/php-src/trunk/ext/soap/php_http.c === --- php/php-src/trunk/ext/soap/php_http.c 2012-03-08 19:31:57 UTC (rev 324026) +++ php/php-src/trunk/ext/soap/php_http.c 2012-03-08 20:14:26 UTC (rev 324027) @@ -1313,15 +1313,15 @@ } if (header_chunked) { - char ch, done, chunk_size[10], headerbuf[8192]; + char ch, done, headerbuf[8192]; done = FALSE; while (!done) { int buf_size = 0; - php_stream_gets(stream, chunk_size, sizeof(chunk_size)); - if (sscanf(chunk_size, "%x", &buf_size) > 0 ) { + php_stream_gets(stream, headerbuf, sizeof(headerbuf)); + if (sscanf(headerbuf, "%x", &buf_size) > 0 ) { if (buf_size > 0) { int len_size = 0; -- 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/mysqli/ mysqli.c
johannes Thu, 08 Mar 2012 12:52:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=324022 Log: Use correct property ctor, should fix threading issue in bug #55334 # The code was refactored in 5_4/trunk, no need to merge Bug: https://bugs.php.net/55334 (Open) MySQLi make mod_php crash on stress test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2012-03-08 12:39:48 UTC (rev 324021) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2012-03-08 12:52:12 UTC (rev 324022) @@ -502,7 +502,7 @@ (void **) &intern->prop_handler); zend_object_std_init(&intern->zo, class_type TSRMLS_CC); - zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *)); /* link object */ -- 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/main/streams/streams.c branches/PHP_5_4/main/streams/streams.c trunk/main/streams/streams.c
cataphract Thu, 08 Mar 2012 12:39:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=324021 Log: - Oops committed old version of the patch in r324020. Fixed. See bug #61253. Bug: https://bugs.php.net/61253 (Assigned) Wrappers opened with errors concurrency problem Changed paths: U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/branches/PHP_5_4/main/streams/streams.c U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-03-08 12:30:59 UTC (rev 324020) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-03-08 12:39:48 UTC (rev 324021) @@ -201,7 +201,7 @@ err_buf_p = zend_llist_get_next_ex(err_list, &pos), i++) { strcat(msg, *err_buf_p); if (i < count - 1) { - l += brlen; + strcat(msg, br); } } Modified: php/php-src/branches/PHP_5_4/main/streams/streams.c === --- php/php-src/branches/PHP_5_4/main/streams/streams.c 2012-03-08 12:30:59 UTC (rev 324020) +++ php/php-src/branches/PHP_5_4/main/streams/streams.c 2012-03-08 12:39:48 UTC (rev 324021) @@ -210,7 +210,7 @@ err_buf_p = zend_llist_get_next_ex(err_list, &pos), i++) { strcat(msg, *err_buf_p); if (i < count - 1) { - l += brlen; + strcat(msg, br); } } Modified: php/php-src/trunk/main/streams/streams.c === --- php/php-src/trunk/main/streams/streams.c2012-03-08 12:30:59 UTC (rev 324020) +++ php/php-src/trunk/main/streams/streams.c2012-03-08 12:39:48 UTC (rev 324021) @@ -210,7 +210,7 @@ err_buf_p = zend_llist_get_next_ex(err_list, &pos), i++) { strcat(msg, *err_buf_p); if (i < count - 1) { - l += brlen; + strcat(msg, br); } } -- 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/standard/basic_functions.c branches/PHP_5_3/ext/standard/file.h branches/PHP_5_3/main/php_streams.h branches/PHP_5_3/main/stream
cataphract Thu, 08 Mar 2012 12:30:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=324020 Log: - Fixed bug #61253: Wrappers opened with errors concurrency problem #NOTE: There is a very small possibility that this will further break #extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the #only one and it may leak memory after this. I say "further break" because #extensions that do that are already broken (will segfault) under ZTS, which is #why this patch is necessary. #There was what I deem as tacit acceptance from 5.3/5.4 RMs on this. Bug: https://bugs.php.net/61253 (Assigned) Wrappers opened with errors concurrency problem Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/file.h U php/php-src/branches/PHP_5_3/main/php_streams.h U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_4/ext/standard/file.h U php/php-src/branches/PHP_5_4/main/php_streams.h U php/php-src/branches/PHP_5_4/main/streams/streams.c U php/php-src/trunk/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/file.h U php/php-src/trunk/main/php_streams.h U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-08 12:23:22 UTC (rev 324019) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-08 12:30:59 UTC (rev 324020) @@ -76,6 +76,8 @@ SessionHandler::write()). (Ilia) - Streams: + . Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS). +(Gustavo) . Fixed bug #61115 (stream related segfault on fatal error in php_stream_context_link). (Gustavo) . Fixed bug #60106 (stream_socket_server silently truncates long unix 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 2012-03-08 12:23:22 UTC (rev 324019) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-08 12:30:59 UTC (rev 324020) @@ -3751,6 +3751,8 @@ /* Default to global filters only */ FG(stream_filters) = NULL; + FG(wrapper_errors) = NULL; + return SUCCESS; } /* }}} */ Modified: php/php-src/branches/PHP_5_3/ext/standard/file.h === --- php/php-src/branches/PHP_5_3/ext/standard/file.h 2012-03-08 12:23:22 UTC (rev 324019) +++ php/php-src/branches/PHP_5_3/ext/standard/file.h 2012-03-08 12:30:59 UTC (rev 324020) @@ -123,6 +123,7 @@ php_stream_context *default_context; HashTable *stream_wrappers; /* per-request copy of url_stream_wrappers_hash */ HashTable *stream_filters; /* per-request copy of stream_filters_hash */ + HashTable *wrapper_errors; /* key: wrapper address; value: linked list of char* */ } php_file_globals; #ifdef ZTS Modified: php/php-src/branches/PHP_5_3/main/php_streams.h === --- php/php-src/branches/PHP_5_3/main/php_streams.h 2012-03-08 12:23:22 UTC (rev 324019) +++ php/php-src/branches/PHP_5_3/main/php_streams.h 2012-03-08 12:30:59 UTC (rev 324020) @@ -162,8 +162,8 @@ int is_url; /* so that PG(allow_url_fopen) can be respected */ /* support for wrappers to return (multiple) error messages to the stream opener */ - int err_count; - char **err_stack; + int err_count; /* unused */ + char **err_stack;/* unusued */ }; #define PHP_STREAM_FLAG_NO_SEEK 1 Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-03-08 12:23:22 UTC (rev 324019) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-03-08 12:30:59 UTC (rev 324020) @@ -148,20 +148,35 @@ /* }}} */ +static zend_llist *php_get_wrapper_errors_list(php_stream_wrapper *wrapper TSRMLS_DC) +{ +zend_llist *list = NULL; +if (!FG(wrapper_errors)) { +return NULL; +} else { +zend_hash_find(FG(wrapper_errors), (const char*)&wrapper, +sizeof wrapper, (void**)&list); +return list; +} +} + /* {{{ wrapper error reporting */ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, const char *caption TSRMLS_DC) { char *tmp = estrdup(path); char *msg; int free_msg = 0; - php_stream_wrapper orig_wrapper; if (wrapper) { - if (wrapper->err_count > 0) { + zend_llist *err_list = php_get_wrapper_errors_list(wrapper TSRMLS_CC); + if (err_list) { + size_t l = 0; + int brlen; int i; - size_t l; - int brlen; -
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_pgsql/pgsql_driver.c branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt branches/PHP_5_4/ext/pdo_pgsql/pgsql_driver.c branch
cataphract Thu, 08 Mar 2012 08:52:28 + Revision: http://svn.php.net/viewvc?view=revision&revision=324014 Log: - Fixed bug #61267: pdo_pgsql's PDO::exec() returns the number of SELECTed rows on postgresql >= 9 Bug: https://bugs.php.net/61267 (Open) pdo_pgsql's PDO::exec() returns the number of SELECTed rows on postgresql >= 9. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_driver.c A php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt U php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pgsql_driver.c A php/php-src/branches/PHP_5_4/ext/pdo_pgsql/tests/bug61267.phpt U php/php-src/trunk/ext/pdo_pgsql/pgsql_driver.c A php/php-src/trunk/ext/pdo_pgsql/tests/bug61267.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-08 08:45:31 UTC (rev 324013) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-08 08:52:28 UTC (rev 324014) @@ -2,10 +2,6 @@ ||| ?? ??? 2012, PHP 5.3.11 -- Array: - . Fixed bug #52719 (array_walk_recursive crashes if third param of the -function is by reference). (Nikita Popov) - - Core: . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). @@ -25,6 +21,8 @@ . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) . Fixed bug #60227 (header() cannot detect the multi-line header with CR). (rui, Gustavo) + . Fixed bug #52719 (array_walk_recursive crashes if third param of the +function is by reference). (Nikita Popov) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) - Installation @@ -45,8 +43,13 @@ . Fixed bug #61194 (PDO should export compression flag with myslqnd). (Johannes) +- PDO_pgsql + . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed +rows on postgresql >= 9). (ben dot pineau at gmail dot com) + - Phar: - . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic) + . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL +bytes). (Nikic) - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_driver.c 2012-03-08 08:45:31 UTC (rev 324013) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_driver.c 2012-03-08 08:52:28 UTC (rev 324014) @@ -299,7 +299,7 @@ return -1; } H->pgoid = PQoidValue(res); - ret = atol(PQcmdTuples(res)); + ret = (qs == PGRES_COMMAND_OK) ? atol(PQcmdTuples(res)) : 0L; PQclear(res); return ret; Added: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt 2012-03-08 08:52:28 UTC (rev 324014) @@ -0,0 +1,22 @@ +--TEST-- +PDO::exec() returns 0 when the statement is a SELECT. +--SKIPIF-- + +--FILE-- +exec('SELECT * from generate_series(1, 42);'); +var_dump($res); +echo "Done\n"; +?> +--EXPECTF-- +int(0) +Done Property changes on: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/bug61267.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pgsql_driver.c === --- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pgsql_driver.c 2012-03-08 08:45:31 UTC (rev 324013) +++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pgsql_driver.c 2012-03-08 08:52:28 UTC (rev 324014) @@ -299,7 +299,7 @@ return -1; } H->pgoid = PQoidValue(res); - ret = atol(PQcmdTuples(res)); + ret = (qs == PGRES_COMMAND_OK) ? atol(PQcmdTuples(res)) : 0L; PQclear(res); return ret; Added: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/tests/bug61267.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/tests/bug61267.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/tests/bug61267.phpt 2012-03-08 08:52:28 UTC (rev 324014) @@ -0,0 +1,22 @@ +--TEST-- +PDO::exec() returns 0 when the statement is a SELECT. +--SKIPIF-- + +--FILE-- +exec('SELECT * from generate_series(1, 42);'); +var_dump($res); +echo "Done\n"; +?> +--EXPECTF-- +int(0) +Done Property changes on: php/php-
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/session.c trunk/ext/session/session.c
iliaaThu, 08 Mar 2012 03:31:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=324009 Log: Fixed bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) Bug: https://bugs.php.net/60634 (Assigned) Segmentation fault when trying to die() in SessionHandler::write() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/session/session.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/session/session.c U php/php-src/trunk/ext/session/session.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-07 19:47:18 UTC (rev 324008) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-08 03:31:46 UTC (rev 324009) @@ -52,6 +52,7 @@ . Fixed bug #60811 (php-fpm compilation problem). (rasmus) - SOAP + . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) @@ -61,9 +62,6 @@ - PDO_Sqlite extension: . Add createCollation support. (Damien) -- SOAP: - . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry) - - Reflection: . Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()). (Laruence) @@ -71,6 +69,8 @@ - Session: . Fixed bug #60860 (session.save_handler=user without defined function core dumps). (Felipe) + . Fixed bug #60634 (Segmentation fault when trying to die() in +SessionHandler::write()). (Ilia) - Streams: . Fixed bug #61115 (stream related segfault on fatal error in Modified: php/php-src/branches/PHP_5_3/ext/session/session.c === --- php/php-src/branches/PHP_5_3/ext/session/session.c 2012-03-07 19:47:18 UTC (rev 324008) +++ php/php-src/branches/PHP_5_3/ext/session/session.c 2012-03-08 03:31:46 UTC (rev 324009) @@ -1512,9 +1512,7 @@ { if (PS(session_status) == php_session_active) { PS(session_status) = php_session_none; - zend_try { - php_session_save_current_state(TSRMLS_C); - } zend_end_try(); + php_session_save_current_state(TSRMLS_C); } } /* }}} */ @@ -2167,7 +2165,9 @@ { int i; - php_session_flush(TSRMLS_C); + zend_try { + php_session_flush(TSRMLS_C); + } zend_end_try(); php_rshutdown_session_globals(TSRMLS_C); /* this should NOT be done in php_rshutdown_session_globals() */ Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-07 19:47:18 UTC (rev 324008) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-08 03:31:46 UTC (rev 324009) @@ -44,6 +44,10 @@ . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled). (Johannes) +- Session + . Fixed bug #60634 (Segmentation fault when trying to die() in +SessionHandler::write()). (Ilia) + - SOAP . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) Modified: php/php-src/branches/PHP_5_4/ext/session/session.c === --- php/php-src/branches/PHP_5_4/ext/session/session.c 2012-03-07 19:47:18 UTC (rev 324008) +++ php/php-src/branches/PHP_5_4/ext/session/session.c 2012-03-08 03:31:46 UTC (rev 324009) @@ -1450,9 +1450,7 @@ { if (PS(session_status) == php_session_active) { PS(session_status) = php_session_none; - zend_try { - php_session_save_current_state(TSRMLS_C); - } zend_end_try(); + php_session_save_current_state(TSRMLS_C); } } /* }}} */ @@ -2142,7 +2140,9 @@ { int i; - php_session_flush(TSRMLS_C); + zend_try { + php_session_flush(TSRMLS_C); + } zend_end_try(); php_rshutdown_session_globals(TSRMLS_C); /* this should NOT be done in php_rshutdown_session_globals() */ Modified: php/php-src/trunk/ext/session/session.c === --- php/php-src/trunk/ext/session/session.c 2012-03-07 19:47:18 UTC (rev 324008) +++ php/php-src/trunk/ext/session/session.c 2012-03-08 03:31:46 UTC (rev 324009) @@ -1450,9 +1450,7 @@ { if (PS(session_status) == php_session_active) { PS(session_status) = php_session_none; - zend_try { - php_session_save_current_state(TSRMLS_C); - } zend_end_try(); + php_session_save_current_state(TSRMLS_C); } } /* }}} */ @@ -2142,7 +2140,9 @@ { int i; -
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ README.ZEND_MM zend_API.c
On Tue, 6 Mar 2012, Stas Malyshev wrote: > > +Since PHP 5.4 it is possible to prevent shared extensions from unloading > > so > > Since 5.4 doesn't look right in 5.3 upgrading :) ITYM since 5.3.11? Fixed, thanks :-) Derick -- 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/README.ZEND_MM branches/PHP_5_4/Zend/README.ZEND_MM trunk/Zend/README.ZEND_MM
derick Tue, 06 Mar 2012 18:34:10 + Revision: http://svn.php.net/viewvc?view=revision&revision=323962 Log: Fixed version numbers. Changed paths: U php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM U php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM U php/php-src/trunk/Zend/README.ZEND_MM Modified: php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM === --- php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM2012-03-06 18:25:55 UTC (rev 323961) +++ php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM2012-03-06 18:34:10 UTC (rev 323962) @@ -27,7 +27,7 @@ Shared extensions: -- -Since PHP 5.4 it is possible to prevent shared extensions from unloading so +Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so that valgrind can correctly track the memory leaks in shared extensions. For this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then DL_UNLOAD() is skipped during the shutdown of shared extensions. Modified: php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM === --- php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM2012-03-06 18:25:55 UTC (rev 323961) +++ php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM2012-03-06 18:34:10 UTC (rev 323962) @@ -27,7 +27,7 @@ Shared extensions: -- -Since PHP 5.4 it is possible to prevent shared extensions from unloading so +Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so that valgrind can correctly track the memory leaks in shared extensions. For this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then DL_UNLOAD() is skipped during the shutdown of shared extensions. Modified: php/php-src/trunk/Zend/README.ZEND_MM === --- php/php-src/trunk/Zend/README.ZEND_MM 2012-03-06 18:25:55 UTC (rev 323961) +++ php/php-src/trunk/Zend/README.ZEND_MM 2012-03-06 18:34:10 UTC (rev 323962) @@ -27,7 +27,7 @@ Shared extensions: -- -Since PHP 5.4 it is possible to prevent shared extensions from unloading so +Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so that valgrind can correctly track the memory leaks in shared extensions. For this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then DL_UNLOAD() is skipped during the shutdown of shared extensions. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ README.ZEND_MM zend_API.c
Hi! +Since PHP 5.4 it is possible to prevent shared extensions from unloading so Since 5.4 doesn't look right in 5.3 upgrading :) ITYM since 5.3.11? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ README.ZEND_MM zend_API.c
derick Tue, 06 Mar 2012 18:25:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=323961 Log: Add the ZEND_DONT_UNLOAD_MODULES environment variable for debugging to 5.3 as well. Changed paths: U php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM U php/php-src/branches/PHP_5_3/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM === --- php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM2012-03-06 17:42:59 UTC (rev 323960) +++ php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM2012-03-06 18:25:55 UTC (rev 323961) @@ -24,6 +24,14 @@ $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();' +Shared extensions: +-- + +Since PHP 5.4 it is possible to prevent shared extensions from unloading so +that valgrind can correctly track the memory leaks in shared extensions. For +this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then +DL_UNLOAD() is skipped during the shutdown of shared extensions. + Tweaking: - Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-03-06 17:42:59 UTC (rev 323960) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-03-06 18:25:55 UTC (rev 323961) @@ -2137,7 +2137,7 @@ #if HAVE_LIBDL #if !(defined(NETWARE) && defined(APACHE_1_BUILD)) - if (module->handle) { + if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { DL_UNLOAD(module->handle); } #endif -- 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/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt trunk/ext
johannes Tue, 06 Mar 2012 01:43:49 + Revision: http://svn.php.net/viewvc?view=revision&revision=323932 Log: Apply test fix for bug #61288 pdo_mysql___construct_options_libmysql.phpt test fails Bug: https://bugs.php.net/61288 (Open) pdo_mysql___construct_options_libmysql.phpt test fails Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt U php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt U php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 00:15:40 UTC (rev 323931) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 01:43:49 UTC (rev 323932) @@ -4,6 +4,7 @@ Modified: php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt === --- php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 00:15:40 UTC (rev 323931) +++ php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 01:43:49 UTC (rev 323932) @@ -4,6 +4,7 @@ Modified: php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt === --- php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 00:15:40 UTC (rev 323931) +++ php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt 2012-03-06 01:43:49 UTC (rev 323932) @@ -4,6 +4,7 @@ -- 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/mysqli/mysqli_prop.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/mysqli/mysqli_prop.c trunk/ext/mysqli/mysqli_prop.c
johannes Tue, 06 Mar 2012 00:15:40 + Revision: http://svn.php.net/viewvc?view=revision&revision=323931 Log: Fix bug #61003 mysql_stat() require a valid connection Bug: https://bugs.php.net/61003 (Assigned) mysql_stat() require a valid connection Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c U php/php-src/trunk/ext/mysqli/mysqli_prop.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 23:57:24 UTC (rev 323930) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-06 00:15:40 UTC (rev 323931) @@ -36,6 +36,9 @@ - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). +- mysqli + . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes). + - PDO_mysql . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work). (Johannes) Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c 2012-03-05 23:57:24 UTC (rev 323930) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c 2012-03-06 00:15:40 UTC (rev 323931) @@ -211,7 +211,11 @@ MAKE_STD_ZVAL(*retval); ZVAL_NULL(*retval); +#if defined(MYSQLI_USE_MYSQLND) CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); +#else + CHECK_STATUS(MYSQLI_STATUS_VALID); +#endif mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-05 23:57:24 UTC (rev 323930) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-06 00:15:40 UTC (rev 323931) @@ -38,6 +38,9 @@ - mbstring: . MFH mb_ereg_replace_callback() for security enhancements. (Rui) +- mysqli + . Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes). + - mysqlnd . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled). (Johannes) Modified: php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c === --- php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c 2012-03-05 23:57:24 UTC (rev 323930) +++ php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c 2012-03-06 00:15:40 UTC (rev 323931) @@ -260,7 +260,11 @@ MAKE_STD_ZVAL(*retval); ZVAL_NULL(*retval); +#if defined(MYSQLI_USE_MYSQLND) CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); +#else + CHECK_STATUS(MYSQLI_STATUS_VALID); +#endif mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; Modified: php/php-src/trunk/ext/mysqli/mysqli_prop.c === --- php/php-src/trunk/ext/mysqli/mysqli_prop.c 2012-03-05 23:57:24 UTC (rev 323930) +++ php/php-src/trunk/ext/mysqli/mysqli_prop.c 2012-03-06 00:15:40 UTC (rev 323931) @@ -260,7 +260,11 @@ MAKE_STD_ZVAL(*retval); ZVAL_NULL(*retval); +#if defined(MYSQLI_USE_MYSQLND) CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); +#else + CHECK_STATUS(MYSQLI_STATUS_VALID); +#endif mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; -- 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/pdo_mysql/mysql_driver.c branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h branches/
johannes Mon, 05 Mar 2012 23:57:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=323930 Log: Fix bug #61194 PDO should export compression flag with myslqnd Bug: https://bugs.php.net/61194 (Closed) PDO should export compression flag with myslqnd Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c U php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c U php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_driver.c U php/php-src/branches/PHP_5_4/ext/pdo_mysql/pdo_mysql.c U php/php-src/branches/PHP_5_4/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c U php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 23:55:12 UTC (rev 323929) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-05 23:57:24 UTC (rev 323930) @@ -36,6 +36,12 @@ - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). +- PDO_mysql + . Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't +always work). (Johannes) + . Fixed bug #61194 (PDO should export compression flag with myslqnd). +(Johannes) + - Phar: . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic) Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2012-03-05 23:55:12 UTC (rev 323929) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2012-03-05 23:57:24 UTC (rev 323930) @@ -624,8 +624,8 @@ char *init_cmd = NULL; #ifndef PDO_USE_MYSQLND char *default_file = NULL, *default_group = NULL; - long compress = 0; #endif + long compress = 0; #if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL; #endif @@ -706,7 +706,7 @@ } efree(default_group); } - +#endif compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC); if (compress) { if (mysql_options(H->server, MYSQL_OPT_COMPRESS, 0)) { @@ -714,7 +714,6 @@ goto cleanup; } } -#endif #if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) ssl_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC); ssl_cert = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC); Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c 2012-03-05 23:55:12 UTC (rev 323929) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c 2012-03-05 23:57:24 UTC (rev 323930) @@ -84,8 +84,8 @@ REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE", (long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_FILE", (long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_READ_DEFAULT_GROUP", (long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP); +#endif REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", (long)PDO_MYSQL_ATTR_COMPRESS); -#endif REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_DIRECT_QUERY", (long)PDO_MYSQL_ATTR_DIRECT_QUERY); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", (long)PDO_MYSQL_ATTR_FOUND_ROWS); REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", (long)PDO_MYSQL_ATTR_IGNORE_SPACE); Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2012-03-05 23:55:12 UTC (rev 323929) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2012-03-05 23:57:24 UTC (rev 323930) @@ -163,8 +163,8 @@ PDO_MYSQL_ATTR_READ_DEFAULT_FILE, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, +#endif PDO_MYSQL_ATTR_COMPRESS, -#endif PDO_MYSQL_ATTR_DIRECT_QUERY, PDO_MYSQL_ATTR_FOUND_ROWS, PDO_MYSQL_ATTR_IGNORE_SPACE, Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt === --- php/php-src/branches/PHP_5_3/ext/pd
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c branches/PHP_5_3/ext/pdo_mysql/tests/bug_61207.phpt branches/PHP_5_4/ext/pdo_mysql/mysql_statement.c branches/PHP_5_4/ext/
johannes Mon, 05 Mar 2012 23:38:15 + Revision: http://svn.php.net/viewvc?view=revision&revision=323928 Log: Fix Bug #61207 PDO::nextRowset() after a multi-statement query doesn't always work Bug: https://bugs.php.net/61207 (Assigned) PDO::nextRowset() after a multi-statement query doesn't always work Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c A php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_61207.phpt U php/php-src/branches/PHP_5_4/ext/pdo_mysql/mysql_statement.c A php/php-src/branches/PHP_5_4/ext/pdo_mysql/tests/bug_61207.phpt U php/php-src/trunk/ext/pdo_mysql/mysql_statement.c A php/php-src/trunk/ext/pdo_mysql/tests/bug_61207.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c 2012-03-05 21:22:15 UTC (rev 323927) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_statement.c 2012-03-05 23:38:15 UTC (rev 323928) @@ -131,6 +131,39 @@ } /* }}} */ +static int pdo_mysql_fill_stmt_from_result(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ +{ + pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; + pdo_mysql_db_handle *H = S->H; + my_ulonglong row_count; + PDO_DBG_ENTER("pdo_mysql_fill_stmt_from_result"); + + row_count = mysql_affected_rows(H->server); + if (row_count == (my_ulonglong)-1) { + /* we either have a query that returned a result set or an error occured + lets see if we have access to a result set */ + if (!H->buffered) { + S->result = mysql_use_result(H->server); + } else { + S->result = mysql_store_result(H->server); + } + if (NULL == S->result) { + pdo_mysql_error_stmt(stmt); + PDO_DBG_RETURN(0); + } + + stmt->row_count = (long) mysql_num_rows(S->result); + stmt->column_count = (int) mysql_num_fields(S->result); + S->fields = mysql_fetch_fields(S->result); + } else { + /* this was a DML or DDL query (INSERT, UPDATE, DELETE, ... */ + stmt->row_count = (long) row_count; + } + + PDO_DBG_RETURN(1); +} +/* }}} */ + #ifdef HAVE_MYSQL_STMT_PREPARE static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ { @@ -310,30 +343,7 @@ PDO_DBG_RETURN(0); } - row_count = mysql_affected_rows(H->server); - if (row_count == (my_ulonglong)-1) { - /* we either have a query that returned a result set or an error occured - lets see if we have access to a result set */ - if (!H->buffered) { - S->result = mysql_use_result(H->server); - } else { - S->result = mysql_store_result(H->server); - } - if (NULL == S->result) { - pdo_mysql_error_stmt(stmt); - PDO_DBG_RETURN(0); - } - - stmt->row_count = (long) mysql_num_rows(S->result); - stmt->column_count = (int) mysql_num_fields(S->result); - S->fields = mysql_fetch_fields(S->result); - - } else { - /* this was a DML or DDL query (INSERT, UPDATE, DELETE, ... */ - stmt->row_count = (long) row_count; - } - - PDO_DBG_RETURN(1); + PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC)); } /* }}} */ @@ -421,25 +431,7 @@ /* No more results */ PDO_DBG_RETURN(0); } else { - if (!H->buffered) { - S->result = mysql_use_result(H->server); - row_count = 0; - } else { - S->result = mysql_store_result(H->server); - if ((long)-1 == (row_count = (long) mysql_affected_rows(H->server))) { -pdo_mysql_error_stmt(stmt); -PDO_DBG_RETURN(0); - } - } - - if (NULL == S->result) { - PDO_DBG_RETURN(0); - } - - stmt->row_count = row_count; - stmt->column_count = (int) mysql_num_fields(S->result); - S->fields = mysql_fetch_fields(S->result); - PDO_DBG_RETURN(1); + PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC)); } #else strcpy(stmt->error_code, "HYC00"); Added: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_61207.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_61207.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/bug_61207.phpt 2012-03-05 23:38:15 UTC (rev 323928) @@ -0,0 +1,103 @@ +--TEST-- +PDO MySQL Bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work) +--SKIPIF-- + +--FILE-- +query('create table `bug61207`( `id` int )'); + +$handle1 = $link->prepare('insert into bug61207(id) values(1); + select * from bug61207 where id = ?; + update bug61207 set id = 2 where id = ?;'); + +$handle1->bindValue('1', '1'); +$handle1->bindValue('2', '1'); + +$handle1->execute(); +$i = 1; +print("Handle 1:\n"); +do { + print('Rowset ' . $i++ . "\n"); + if ($handle1->columnCount() > 0) + print("Results detected\n"); +} while($handle1->nextRowset()); + +$handle2 = $link->prepare('select * from bug61207 where id = ?; + update bug61207 set id = 1 where id = ?;'); + +$h
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/win32/inet.h PHP_5_4/win32/inet.h
pajoye Mon, 05 Mar 2012 20:53:40 + Revision: http://svn.php.net/viewvc?view=revision&revision=323926 Log: - fix bug #61290, fix build Bug: https://bugs.php.net/61290 (Open) php_sockets build failure - unresolved external symbol _inet_aton Changed paths: U php/php-src/branches/PHP_5_3/win32/inet.h U php/php-src/branches/PHP_5_4/win32/inet.h Modified: php/php-src/branches/PHP_5_3/win32/inet.h === --- php/php-src/branches/PHP_5_3/win32/inet.h 2012-03-05 20:14:55 UTC (rev 323925) +++ php/php-src/branches/PHP_5_3/win32/inet.h 2012-03-05 20:53:40 UTC (rev 323926) @@ -3,7 +3,7 @@ #endif #include -#if (_WIN32_WINNT <= 0x500) +#if (_WIN32_WINNT < 0x0600) PHPAPI int inet_pton(int af, const char* src, void* dst); PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size); PHPAPI int inet_aton(const char *cp, struct in_addr *inp); Modified: php/php-src/branches/PHP_5_4/win32/inet.h === --- php/php-src/branches/PHP_5_4/win32/inet.h 2012-03-05 20:14:55 UTC (rev 323925) +++ php/php-src/branches/PHP_5_4/win32/inet.h 2012-03-05 20:53:40 UTC (rev 323926) @@ -3,7 +3,7 @@ #endif #include -#if (_WIN32_WINNT <= 0x502) +#if (_WIN32_WINNT < 0x0600) PHPAPI int inet_pton(int af, const char* src, void* dst); PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size); PHPAPI int inet_aton(const char *cp, struct in_addr *inp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_sdl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_sdl.c trunk/ext/soap/php_sdl.c
On Mon, Mar 5, 2012 at 13:59, Dmitry Stogov wrote: > dmitry Mon, 05 Mar 2012 12:59:01 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323909 > > Log: > Fixed bug #60887 (SoapClient ignores user_agent option and sends no > User-Agent header) > > Bug: https://bugs.php.net/60887 (Assigned) SoapClient ignores user_agent > option and sends no User-Agent header > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c > U php/php-src/branches/PHP_5_4/NEWS > U php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c > U php/php-src/trunk/ext/soap/php_sdl.c > > Modified: php/php-src/branches/PHP_5_3/NEWS > === > --- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:47:25 UTC (rev 323908) > +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:59:01 UTC (rev 323909) > @@ -41,7 +41,11 @@ > > - PHP-FPM SAPI: > . Fixed bug #60811 (php-fpm compilation problem). (rasmus) > - > + > +- SOAP > + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no > + User-Agent header). (carloschilazo at gmail dot com) > + > - SQLite3 extension: > . Add createCollation() method. (Brad Dewar) > > > Modified: php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c > === > --- php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:47:25 > UTC (rev 323908) > +++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:59:01 > UTC (rev 323909) > @@ -3259,6 +3259,13 @@ > context = php_stream_context_alloc(); > } > > + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent", > sizeof("_user_agent"), (void **) &tmp) == SUCCESS && > + Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) { > + smart_str_appends(&headers, "User-Agent: "); > + smart_str_appends(&headers, Z_STRVAL_PP(tmp)); > + smart_str_appends(&headers, "\r\n"); > + } Shouldn't it fallback on the ini option? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/soap/php_sdl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/soap/php_sdl.c trunk/ext/soap/php_sdl.c
dmitry Mon, 05 Mar 2012 12:59:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=323909 Log: Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header) Bug: https://bugs.php.net/60887 (Assigned) SoapClient ignores user_agent option and sends no User-Agent header Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c U php/php-src/trunk/ext/soap/php_sdl.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-05 12:59:01 UTC (rev 323909) @@ -41,7 +41,11 @@ - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) - + +- SOAP + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no +User-Agent header). (carloschilazo at gmail dot com) + - SQLite3 extension: . Add createCollation() method. (Brad Dewar) Modified: php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c === --- php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_3/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909) @@ -3259,6 +3259,13 @@ context = php_stream_context_alloc(); } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent", sizeof("_user_agent"), (void **) &tmp) == SUCCESS && + Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) { + smart_str_appends(&headers, "User-Agent: "); + smart_str_appends(&headers, Z_STRVAL_PP(tmp)); + smart_str_appends(&headers, "\r\n"); + } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_host", sizeof("_proxy_host"), (void **) &proxy_host) == SUCCESS && Z_TYPE_PP(proxy_host) == IS_STRING && zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_port", sizeof("_proxy_port"), (void **) &proxy_port) == SUCCESS && Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-05 12:59:01 UTC (rev 323909) @@ -38,6 +38,10 @@ - mbstring: . MFH mb_ereg_replace_callback() for security enhancements. (Rui) +- SOAP + . Fixed bug #60887 (SoapClient ignores user_agent option and sends no +User-Agent header). (carloschilazo at gmail dot com) + - Phar . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikita Popov) Modified: php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c === --- php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c 2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/branches/PHP_5_4/ext/soap/php_sdl.c 2012-03-05 12:59:01 UTC (rev 323909) @@ -3259,6 +3259,13 @@ context = php_stream_context_alloc(TSRMLS_C); } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent", sizeof("_user_agent"), (void **) &tmp) == SUCCESS && + Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) { + smart_str_appends(&headers, "User-Agent: "); + smart_str_appends(&headers, Z_STRVAL_PP(tmp)); + smart_str_appends(&headers, "\r\n"); + } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_host", sizeof("_proxy_host"), (void **) &proxy_host) == SUCCESS && Z_TYPE_PP(proxy_host) == IS_STRING && zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_port", sizeof("_proxy_port"), (void **) &proxy_port) == SUCCESS && Modified: php/php-src/trunk/ext/soap/php_sdl.c === --- php/php-src/trunk/ext/soap/php_sdl.c2012-03-05 12:47:25 UTC (rev 323908) +++ php/php-src/trunk/ext/soap/php_sdl.c2012-03-05 12:59:01 UTC (rev 323909) @@ -3259,6 +3259,13 @@ context = php_stream_context_alloc(TSRMLS_C); } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_user_agent", sizeof("_user_agent"), (void **) &tmp) == SUCCESS && + Z_TYPE_PP(tmp) == IS_STRING && Z_STRLEN_PP(tmp) > 0) { + smart_str_appends(&headers, "User-Agent: "); + smart_str_appends(&headers, Z_STRVAL_PP(tmp)); + smart_str_appends(&headers, "\r\n"); + } + if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_host", sizeof("_proxy_host"), (void **) &proxy_host) == SUCCESS && Z_TYPE_PP(proxy_host) == IS_STRING && zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_port", sizeof("_proxy_po
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_API.c branches/PHP_5_4/Zend/zend_API.c trunk/Zend/zend_API.c
dmitry Mon, 05 Mar 2012 12:47:25 + Revision: http://svn.php.net/viewvc?view=revision&revision=323908 Log: Fixed module numbering Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/branches/PHP_5_4/Zend/zend_API.c U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-03-05 12:21:39 UTC (rev 323907) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-03-05 12:47:25 UTC (rev 323908) @@ -33,7 +33,6 @@ #endif /* these variables are true statics/globals, and have to be mutex'ed on every access */ -static int module_count=0; ZEND_API HashTable module_registry; /* this function doesn't check for too many parameters */ @@ -2184,7 +2183,7 @@ /* return the next free module number */ int zend_next_free_module(void) /* {{{ */ { - return ++module_count; + return zend_hash_num_elements(&module_registry) + 1; } /* }}} */ Modified: php/php-src/branches/PHP_5_4/Zend/zend_API.c === --- php/php-src/branches/PHP_5_4/Zend/zend_API.c2012-03-05 12:21:39 UTC (rev 323907) +++ php/php-src/branches/PHP_5_4/Zend/zend_API.c2012-03-05 12:47:25 UTC (rev 323908) @@ -33,7 +33,6 @@ #endif /* these variables are true statics/globals, and have to be mutex'ed on every access */ -static int module_count=0; ZEND_API HashTable module_registry; static zend_module_entry **module_request_startup_handlers; @@ -2381,7 +2380,7 @@ /* return the next free module number */ int zend_next_free_module(void) /* {{{ */ { - return ++module_count; + return zend_hash_num_elements(&module_registry) + 1; } /* }}} */ Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-03-05 12:21:39 UTC (rev 323907) +++ php/php-src/trunk/Zend/zend_API.c 2012-03-05 12:47:25 UTC (rev 323908) @@ -33,7 +33,6 @@ #endif /* these variables are true statics/globals, and have to be mutex'ed on every access */ -static int module_count=0; ZEND_API HashTable module_registry; static zend_module_entry **module_request_startup_handlers; @@ -2381,7 +2380,7 @@ /* return the next free module number */ int zend_next_free_module(void) /* {{{ */ { - return ++module_count; + return zend_hash_num_elements(&module_registry) + 1; } /* }}} */ -- 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/win32/build/config.w32.h.in PHP_5_4/win32/build/config.w32.h.in
pajoye Sun, 04 Mar 2012 22:15:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=323903 Log: - fix bug #54407, Incorrectly defined NTDDI_VERSION macro Bug: https://bugs.php.net/54407 (Closed) Incorrectly defined NTDDI_VERSION macro Changed paths: U php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in U php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 20:37:28 UTC (rev 323902) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 22:15:12 UTC (rev 323903) @@ -6,7 +6,7 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x502 +#define _WIN32_WINNT 0x0501 #define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ Modified: php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 20:37:28 UTC (rev 323902) +++ php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 22:15:12 UTC (rev 323903) @@ -6,7 +6,7 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x502 +#define _WIN32_WINNT 0x0501 #define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st
The operation can continue on-successfully so E_NOTICE seemed appropriate, I don't see a problem with escalating this to E_WARNING. On Sat, Mar 3, 2012 at 9:34 PM, Laruence wrote: > Hi: > is a WARNING better? :) > > thanks > > On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky wrote: >> iliaa Sat, 03 Mar 2012 20:36:14 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=323852 >> >> Log: >> Fixed bug #60106 (stream_socket_server silently truncates long unix socket >> paths) >> >> Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix >> socket path = 'Unknown error' >> >> Changed paths: >> U php/php-src/branches/PHP_5_3/NEWS >> A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c >> U php/php-src/branches/PHP_5_4/NEWS >> A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c >> A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/trunk/main/streams/xp_socket.c >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > Laruence Xinchen Hui > http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/main/streams/xp_socket.c trunk/main/streams/xp_socket.c
cataphract Sun, 04 Mar 2012 19:30:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=323897 Log: - size_t may be shorter than long and definitely is not signed. Note that the z modifier was only added in C99, so we can't use it. Changed paths: U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c U php/php-src/trunk/main/streams/xp_socket.c Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c === --- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -514,7 +514,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); Modified: php/php-src/branches/PHP_5_4/main/streams/xp_socket.c === --- php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -510,7 +510,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); Modified: php/php-src/trunk/main/streams/xp_socket.c === --- php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -510,7 +510,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); -- 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/win32/build/config.w32.h.in PHP_5_4/win32/build/config.w32.h.in
pajoye Sun, 04 Mar 2012 15:23:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=323866 Log: - fix bug #54407, Incorrectly defined NTDDI_VERSION macro Bug: https://bugs.php.net/54407 (Assigned) Incorrectly defined NTDDI_VERSION macro Changed paths: U php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in U php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 15:08:12 UTC (rev 323865) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 15:23:24 UTC (rev 323866) @@ -6,8 +6,8 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x500 -#define NTDDI_VERSION _WIN32_WIN2K +#define _WIN32_WINNT 0x502 +#define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" Modified: php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 15:08:12 UTC (rev 323865) +++ php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 15:23:24 UTC (rev 323866) @@ -7,7 +7,7 @@ #undef _WIN32_WINNT #undef NTDDI_VERSION #define _WIN32_WINNT 0x502 -#define NTDDI_VERSION _WIN32_WIN2K +#define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" -- 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/spl/spl_engine.c branches/PHP_5_4/ext/spl/spl_engine.c trunk/ext/spl/spl_engine.c
nikicSun, 04 Mar 2012 13:52:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=323863 Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement Cleanup only, no function change. Patch by ircmaxell. Bug: https://bugs.php.net/60596 (Open) Code Cleanup Removing Superfluous If Statement Changed paths: U php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c U php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c U php/php-src/trunk/ext/spl/spl_engine.c Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } Modified: php/php-src/trunk/ext/spl/spl_engine.c === --- php/php-src/trunk/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/trunk/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st
Hi: is a WARNING better? :) thanks On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky wrote: > iliaa Sat, 03 Mar 2012 20:36:14 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323852 > > Log: > Fixed bug #60106 (stream_socket_server silently truncates long unix socket > paths) > > Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix > socket path = 'Unknown error' > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt > U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c > U php/php-src/branches/PHP_5_4/NEWS > A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt > U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c > A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt > U php/php-src/trunk/main/streams/xp_socket.c > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standa
iliaaSat, 03 Mar 2012 20:36:14 + Revision: http://svn.php.net/viewvc?view=revision&revision=323852 Log: Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix socket path = 'Unknown error' Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt U php/php-src/trunk/main/streams/xp_socket.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-03 15:08:21 UTC (rev 323851) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-03 20:36:14 UTC (rev 323852) @@ -62,6 +62,8 @@ - Streams: . Fixed bug #61115 (stream related segfault on fatal error in php_stream_context_link). (Gustavo) + . Fixed bug #60106 (stream_socket_server silently truncates long unix +socket paths). (Ilia) . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected together with the last read). (Gustavo) . Fixed bug #60817 (stream_get_line() reads from stream even when there is Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt 2012-03-03 20:36:14 UTC (rev 323852) @@ -0,0 +1,14 @@ +--TEST-- +Bug#60106 (stream_socket_server silently truncates long unix socket paths) +--FILE-- + +===DONE=== +--EXPECTF-- +Notice: stream_socket_server(): socket path exceeded the maximum allowed length of %d bytes and was truncated in %s on line %d + +Warning: stream_socket_server(): unable to connect to unix:///tmp/aaa in %s on line %d +===DONE=== + Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c === --- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-03 15:08:21 UTC (rev 323851) +++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-03 20:36:14 UTC (rev 323852) @@ -514,6 +514,7 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-03 15:08:21 UTC (rev 323851) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-03 20:36:14 UTC (rev 323852) @@ -45,6 +45,7 @@ - Standard: . Fixed memory leak in substr_replace. (Pierrick) . Make max_file_uploads ini directive settable outside of php.ini (Rasmus) + . Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths). (Ilia) - XMLRPC: . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita Popov) Added: php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt 2012-03-03 20:36:14 UTC (rev 323852) @@ -0,0 +1,14 @@ +--TEST-- +Bug#60106 (st
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/xmlrpc/tests/bug61264.phpt branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/xmlrpc/tests/
nikicSat, 03 Mar 2012 12:46:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=323850 Log: Fix bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable Bug: https://bugs.php.net/61264 (Open) xmlrpc_parse_method_descriptions leaks temporary variable Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61264.phpt U php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/ext/xmlrpc/tests/bug61264.phpt U php/php-src/branches/PHP_5_4/ext/xmlrpc/xmlrpc-epi-php.c A php/php-src/trunk/ext/xmlrpc/tests/bug61264.phpt U php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-02 23:07:19 UTC (rev 323849) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-03 12:46:17 UTC (rev 323850) @@ -73,6 +73,7 @@ - XMLRPC: . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) + . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov) - Zlib: . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic) Added: php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61264.phpt === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61264.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61264.phpt 2012-03-03 12:46:17 UTC (rev 323850) @@ -0,0 +1,17 @@ +--TEST-- +Bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable +--FILE-- + + + foo + +XML; +var_dump(xmlrpc_parse_method_descriptions($xml)); +?> +--EXPECT-- +array(1) { + ["b"]=> + string(3) "foo" +} Modified: php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2012-03-02 23:07:19 UTC (rev 323849) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2012-03-03 12:46:17 UTC (rev 323850) @@ -1240,8 +1240,7 @@ retval = XMLRPC_to_PHP(xVal); if (retval) { - *return_value = *retval; - zval_copy_ctor(return_value); + RETVAL_ZVAL(retval, 1, 1); } /* dust, sweep, and mop */ XMLRPC_CleanupValue(xVal); Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-02 23:07:19 UTC (rev 323849) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-03 12:46:17 UTC (rev 323850) @@ -48,6 +48,7 @@ - XMLRPC: . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita Popov) + . Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary variable). (Nikita Popov) - Zlib: . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikita Popov) Added: php/php-src/branches/PHP_5_4/ext/xmlrpc/tests/bug61264.phpt === --- php/php-src/branches/PHP_5_4/ext/xmlrpc/tests/bug61264.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/xmlrpc/tests/bug61264.phpt 2012-03-03 12:46:17 UTC (rev 323850) @@ -0,0 +1,17 @@ +--TEST-- +Bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable +--FILE-- + + + foo + +XML; +var_dump(xmlrpc_parse_method_descriptions($xml)); +?> +--EXPECT-- +array(1) { + ["b"]=> + string(3) "foo" +} Modified: php/php-src/branches/PHP_5_4/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/branches/PHP_5_4/ext/xmlrpc/xmlrpc-epi-php.c2012-03-02 23:07:19 UTC (rev 323849) +++ php/php-src/branches/PHP_5_4/ext/xmlrpc/xmlrpc-epi-php.c2012-03-03 12:46:17 UTC (rev 323850) @@ -1240,8 +1240,7 @@ retval = XMLRPC_to_PHP(xVal); if (retval) { - *return_value = *retval; - zval_copy_ctor(return_value); + RETVAL_ZVAL(retval, 1, 1); } /* dust, sweep, and mop */ XMLRPC_CleanupValue(xVal); Added: php/php-src/trunk/ext/xmlrpc/tests/bug61264.phpt === --- php/php-src/trunk/ext/xmlrpc/tests/bug61264.phpt (rev 0) +++ php/php-src/trunk/ext/xmlrpc/tests/bug61264.phpt2012-03-03 12:46:17 UTC (rev 323850) @@ -0,0 +1,17 @@ +--TEST-- +Bug #61264: xmlrpc_parse_method_descriptions leaks tempor
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/array.c branches/PHP_5_3/ext/standard/tests/array/bug52719.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standard/arr
nikicFri, 02 Mar 2012 18:05:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=323837 Log: Fix bug #52719: array_walk_recursive crashes if third param of the function is by reference Bug: https://bugs.php.net/52719 (Re-Opened) array_walk_recursive crashes if third param of the function is by reference Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/array.c A php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug52719.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/array.c A php/php-src/branches/PHP_5_4/ext/standard/tests/array/bug52719.phpt U php/php-src/trunk/ext/standard/array.c A php/php-src/trunk/ext/standard/tests/array/bug52719.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-02 17:15:10 UTC (rev 323836) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-02 18:05:38 UTC (rev 323837) @@ -2,6 +2,10 @@ ||| ?? ??? 2012, PHP 5.3.11 +- Array: + . Fixed bug #52719 (array_walk_recursive crashes if third param of the +function is by reference). (Nikita Popov) + - Core: . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). Modified: php/php-src/branches/PHP_5_3/ext/standard/array.c === --- php/php-src/branches/PHP_5_3/ext/standard/array.c 2012-03-02 17:15:10 UTC (rev 323836) +++ php/php-src/branches/PHP_5_3/ext/standard/array.c 2012-03-02 18:05:38 UTC (rev 323837) @@ -1044,7 +1044,7 @@ } /* }}} */ -static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive TSRMLS_DC) /* {{{ */ +static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive TSRMLS_DC) /* {{{ */ { zval **args[3], /* Arguments to userland function */ *retval_ptr, /* Return value - unused */ @@ -1056,9 +1056,9 @@ /* Set up known arguments */ args[1] = &key; - args[2] = userdata; + args[2] = &userdata; if (userdata) { - Z_ADDREF_PP(userdata); + Z_ADDREF_P(userdata); } zend_hash_internal_pointer_reset_ex(target_hash, &pos); @@ -1080,7 +1080,7 @@ if (thash->nApplyCount > 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected"); if (userdata) { - zval_ptr_dtor(userdata); + zval_ptr_dtor(&userdata); } return 0; } @@ -1133,7 +1133,7 @@ } if (userdata) { - zval_ptr_dtor(userdata); + zval_ptr_dtor(&userdata); } return 0; } @@ -1157,7 +1157,7 @@ return; } - php_array_walk(array, userdata ? &userdata : NULL, 0 TSRMLS_CC); + php_array_walk(array, userdata, 0 TSRMLS_CC); BG(array_walk_fci) = orig_array_walk_fci; BG(array_walk_fci_cache) = orig_array_walk_fci_cache; RETURN_TRUE; @@ -1182,7 +1182,7 @@ return; } - php_array_walk(array, userdata ? &userdata : NULL, 1 TSRMLS_CC); + php_array_walk(array, userdata, 1 TSRMLS_CC); BG(array_walk_fci) = orig_array_walk_fci; BG(array_walk_fci_cache) = orig_array_walk_fci_cache; RETURN_TRUE; Added: php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug52719.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug52719.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug52719.phpt 2012-03-02 18:05:38 UTC (rev 323837) @@ -0,0 +1,15 @@ +--TEST-- +Bug #52719: array_walk_recursive crashes if third param of the function is by reference +--FILE-- + +--EXPECTF-- +Done Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-02 17:15:10 UTC (rev 323836) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-02 18:05:38 UTC (rev 323837) @@ -3,6 +3,8 @@ ?? ??? 2012, PHP 5.4.1 RC1 - Array: + . Fixed bug #52719 (array_walk_recursive crashes if third param of the +function is by reference). (Nikita Popov) . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). (Laruence) Modified: php/php-src/branches/PHP_5_4/ext/standard/array.c === --- php/php-src/branches/PHP_5_4/ext/standard/array.c 2012-03-02 17:15:10 UTC (rev 323836) +++ php/php-src/branches/PHP_5_4/ext/standard/array.c 2012-03-02 18:05:38 UTC (rev 323837) @@ -1050,7 +1050,7 @@ } /* }}} */ -static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive TSRMLS_DC) /* {{{ */ +static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive TSRMLS_DC) /* {{{ */ { zval **args[3], /* Arguments to userland function */ *retval_ptr, /* Return value -
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug20382-2.phpt
rasmus Fri, 02 Mar 2012 17:08:00 + Revision: http://svn.php.net/viewvc?view=revision&revision=323834 Log: Missed 5.3 for the Armenia DST drop Changed paths: U php/php-src/branches/PHP_5_3/ext/date/tests/bug20382-2.phpt Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug20382-2.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug20382-2.phpt 2012-03-02 17:06:53 UTC (rev 323833) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug20382-2.phpt 2012-03-02 17:08:00 UTC (rev 323834) @@ -75,7 +75,7 @@ wanted = Monday00:00:00 Asia/Yerevan -ts = Monday 2037-10-19 17:17:17 AMST +ts = Monday 2037-10-19 17:17:17 AMT result = Monday 2037-10-26 00:00:00 AMT wanted = Monday00:00:00 -- 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 PHP_5_3/ext/standard/string.c PHP_5_3/ext/standard/tests/strings/bug60801.phpt PHP_5_4/NEWS PHP_5_4/ext/standard/string.c PHP_5_4/ext/standard/tests/
aharvey Fri, 02 Mar 2012 03:39:04 + Revision: http://svn.php.net/viewvc?view=revision&revision=323779 Log: MFH: Fix bug #60801 (strpbrk() mishandles NUL byte). (Trunk commit: r322934). Bug: https://bugs.php.net/60801 (Closed) strpbrk() mishandles NUL byte Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/string.c A php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug60801.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/string.c A php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60801.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-02 03:38:04 UTC (rev 323778) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-02 03:39:04 UTC (rev 323779) @@ -18,6 +18,7 @@ functions). (Pierre) . Fixed bug #60825 (Segfault when running symfony 2 tests). (Dmitry, Laruence) + . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) . Fixed bug #60227 (header() cannot detect the multi-line header with CR). (rui, Gustavo) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) Modified: php/php-src/branches/PHP_5_3/ext/standard/string.c === --- php/php-src/branches/PHP_5_3/ext/standard/string.c 2012-03-02 03:38:04 UTC (rev 323778) +++ php/php-src/branches/PHP_5_3/ext/standard/string.c 2012-03-02 03:39:04 UTC (rev 323779) @@ -5240,7 +5240,7 @@ { char *haystack, *char_list; int haystack_len, char_list_len; - char *p; + char *haystack_ptr, *cl_ptr; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &haystack, &haystack_len, &char_list, &char_list_len) == FAILURE) { RETURN_FALSE; @@ -5251,11 +5251,15 @@ RETURN_FALSE; } - if ((p = strpbrk(haystack, char_list))) { - RETURN_STRINGL(p, (haystack + haystack_len - p), 1); - } else { - RETURN_FALSE; + for (haystack_ptr = haystack; haystack_ptr < (haystack + haystack_len); ++haystack_ptr) { + for (cl_ptr = char_list; cl_ptr < (char_list + char_list_len); ++cl_ptr) { + if (*cl_ptr == *haystack_ptr) { + RETURN_STRINGL(haystack_ptr, (haystack + haystack_len - haystack_ptr), 1); + } + } } + + RETURN_FALSE; } /* }}} */ Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug60801.phpt === (Binary files differ) Property changes on: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug60801.phpt ___ Added: svn:mime-type + application/octet-stream Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-02 03:38:04 UTC (rev 323778) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-02 03:39:04 UTC (rev 323779) @@ -15,6 +15,7 @@ . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars). (Laruence) . Fixed bug #60978 (exit code incorrect). (Laruence) + . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) . Fixed bug #60573 (type hinting with "self" keyword causes weird errors). (Laruence) Modified: php/php-src/branches/PHP_5_4/ext/standard/string.c === --- php/php-src/branches/PHP_5_4/ext/standard/string.c 2012-03-02 03:38:04 UTC (rev 323778) +++ php/php-src/branches/PHP_5_4/ext/standard/string.c 2012-03-02 03:39:04 UTC (rev 323779) @@ -5315,7 +5315,7 @@ { char *haystack, *char_list; int haystack_len, char_list_len; - char *p; + char *haystack_ptr, *cl_ptr; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &haystack, &haystack_len, &char_list, &char_list_len) == FAILURE) { RETURN_FALSE; @@ -5326,11 +5326,15 @@ RETURN_FALSE; } - if ((p = strpbrk(haystack, char_list))) { - RETURN_STRINGL(p, (haystack + haystack_len - p), 1); - } else { - RETURN_FALSE; + for (haystack_ptr = haystack; haystack_ptr < (haystack + haystack_len); ++haystack_ptr) { + for (cl_ptr = char_list; cl_ptr < (char_list + char_list_len); ++cl_ptr) { + if (*cl_ptr == *haystack_ptr) { + RETURN_STRINGL(haystack_ptr, (haystack + haystack_len - haystack_ptr), 1); + } + } } + + RETURN_FALSE; } /* }}} */ Added: php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60801
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/configure.in branches/PHP_5_3/sapi/apache2filter/config.m4 branches/PHP_5_3/sapi/apache2handler/config.m4 branches/PHP_5_4/NEWS bran
sixd Fri, 02 Mar 2012 00:07:41 + Revision: http://svn.php.net/viewvc?view=revision&revision=323750 Log: Fixed bug #61172 (Add Apache 2.4 support) Bug: https://bugs.php.net/61172 (Open) With Apache 2.4.1, ./configure fails on APXS but stops only on the MySQL check. 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/sapi/apache2filter/config.m4 U php/php-src/branches/PHP_5_3/sapi/apache2handler/config.m4 U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/configure.in U php/php-src/branches/PHP_5_4/sapi/apache2filter/config.m4 U php/php-src/branches/PHP_5_4/sapi/apache2handler/config.m4 U php/php-src/trunk/configure.in U php/php-src/trunk/sapi/apache2filter/config.m4 U php/php-src/trunk/sapi/apache2handler/config.m4 Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-01 23:58:16 UTC (rev 323749) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-02 00:07:41 UTC (rev 323750) @@ -22,6 +22,9 @@ (rui, Gustavo) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) +- Installation + . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones) + - Fileinfo . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo) Modified: php/php-src/branches/PHP_5_3/configure.in === --- php/php-src/branches/PHP_5_3/configure.in 2012-03-01 23:58:16 UTC (rev 323749) +++ php/php-src/branches/PHP_5_3/configure.in 2012-03-02 00:07:41 UTC (rev 323750) @@ -1550,6 +1550,21 @@ X fi + if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then +if test "$APACHE_VERSION" -ge 2004001; then + if test -z "$APACHE_THREADED_MPM"; then +cat <-- 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/ php.ini-development php.ini-production
sixd Thu, 01 Mar 2012 20:05:18 + Revision: http://svn.php.net/viewvc?view=revision&revision=323729 Log: Change PHP 6 refs to PHP 5.4 and sync some spelling with PHP_5_4 branch files Changed paths: U php/php-src/branches/PHP_5_3/php.ini-development U php/php-src/branches/PHP_5_3/php.ini-production Modified: php/php-src/branches/PHP_5_3/php.ini-development === --- php/php-src/branches/PHP_5_3/php.ini-development2012-03-01 20:02:57 UTC (rev 323728) +++ php/php-src/branches/PHP_5_3/php.ini-development2012-03-01 20:05:18 UTC (rev 323729) @@ -484,7 +484,7 @@ ; development and early testing. ; ; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) ; E_ERROR - fatal run-time errors ; E_RECOVERABLE_ERROR - almost fatal run-time errors ; E_WARNING - run-time warnings (non-fatal errors) @@ -748,7 +748,7 @@ ; enable the feature. We strongly recommend you use the escaping mechanisms ; designed specifically for the database your using instead of relying on this ; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is -; scheduled for removal in PHP 6. +; removed in PHP 5.4. ; Default Value: On ; Development Value: Off ; Production Value: Off @@ -1497,7 +1497,7 @@ ;session.cookie_secure = ; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combatting +; the session id. We encourage this operation as it's very helpful in combating ; session hijacking when not specifying and managing your own session id. It is ; not the end all be all of session hijacking defense, but it's a good start. ; http://php.net/session.use-only-cookies @@ -1627,7 +1627,7 @@ ; - User may send URL contains active session ID ; to other person via. email/irc/etc. ; - URL that contains active session ID may be stored -; in publically accessible computer. +; in publicly accessible computer. ; - User may access your site with the same session ID ; always using URL stored in browser's history or bookmarks. ; http://php.net/session.use-trans-sid Modified: php/php-src/branches/PHP_5_3/php.ini-production === --- php/php-src/branches/PHP_5_3/php.ini-production 2012-03-01 20:02:57 UTC (rev 323728) +++ php/php-src/branches/PHP_5_3/php.ini-production 2012-03-01 20:05:18 UTC (rev 323729) @@ -484,7 +484,7 @@ ; development and early testing. ; ; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) ; E_ERROR - fatal run-time errors ; E_RECOVERABLE_ERROR - almost fatal run-time errors ; E_WARNING - run-time warnings (non-fatal errors) @@ -748,7 +748,7 @@ ; enable the feature. We strongly recommend you use the escaping mechanisms ; designed specifically for the database your using instead of relying on this ; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is -; scheduled for removal in PHP 6. +; scheduled removed in PHP 5.4. ; Default Value: On ; Development Value: Off ; Production Value: Off @@ -1497,7 +1497,7 @@ ;session.cookie_secure = ; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combatting +; the session id. We encourage this operation as it's very helpful in combating ; session hijacking when not specifying and managing your own session id. It is ; not the end all be all of session hijacking defense, but it's a good start. ; http://php.net/session.use-only-cookies @@ -1627,7 +1627,7 @@ ; - User may send URL contains active session ID ; to other person via. email/irc/etc. ; - URL that contains active session ID may be stored -; in publically accessible computer. +; in publicly accessible computer. ; - User may access your site with the same session ID ; always using URL stored in browser's history or bookmarks. ; http://php.net/session.use-trans-sid -- 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/date/lib/timezonedb.h branches/PHP_5_4/ext/date/lib/timezonedb.h trunk/ext/date/lib/timezonedb.h
derick Thu, 01 Mar 2012 15:09:49 + Revision: http://svn.php.net/viewvc?view=revision&revision=323706 Log: - Updated to version 2012.1 (2012a) Changed paths: U php/php-src/branches/PHP_5_3/ext/date/lib/timezonedb.h U php/php-src/branches/PHP_5_4/ext/date/lib/timezonedb.h U php/php-src/trunk/ext/date/lib/timezonedb.h -- 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
sixd Wed, 29 Feb 2012 20:48:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=323677 Log: Add the CVE numbers that were mentioned in the related php.net announcements 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 2012-02-29 18:46:17 UTC (rev 323676) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-29 20:48:17 UTC (rev 323677) @@ -79,7 +79,7 @@ - Core: . Added max_input_vars directive to prevent attacks based on hash collisions -(Dmitry). +(CVE-2011-4885) (Dmitry). . Fixed bug #60205 (possible integer overflow in content_length). (Laruence) . Fixed bug #60139 (Anonymous functions create cycles not detected by the GC). (Dmitry) @@ -158,7 +158,7 @@ - EXIF: . Fixed bug #60150 (Integer overflow during the parsing of invalid exif -header). (Stas, flolechaud at gmail dot com) +header). (CVE-2011-4566) (Stas, flolechaud at gmail dot com) - Fileinfo: . Fixed bug #60094 (C++ comment fails in c89). (Laruence) -- 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
sixd Wed, 29 Feb 2012 18:46:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=323676 Log: Remove "backported" from 5.4 comments since 5.3 is the base version these bugs are fixed. Reorder. 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 2012-02-29 18:26:17 UTC (rev 323675) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-29 18:46:17 UTC (rev 323676) @@ -253,32 +253,30 @@ . Fixed bug #52013 (Unable to decompress files in a compressed phar). (Hannes) - PHP-FPM SAPI: + . Dropped restriction of not setting the same value multiple times, the last +one holds. (giovanni at giacobbi dot net, fat) + . Added .phar to default authorized extensions. (fat) . Fixed bug #60659 (FPM does not clear auth_user on request accept). (bonbons at linux-vserver dot org) . Fixed bug #60629 (memory corruption when web server closed the fcgi fd). (fat) + . Enhance error log when the primary script can't be open. FR #60199. (fat) . Fixed bug #60179 (php_flag and php_value does not work properly). (fat) - . Fixed bug #55526 (Heartbeat causes a lot of unnecessary events). (fat) + . Fixed bug #55577 (status.html does not install). (fat) . Fixed bug #55533 (The -d parameter doesn't work). (fat) - . Implemented FR #52569 (Add the "ondemand" process-manager -to allow zero children). (fat) + . Fixed bug #55526 (Heartbeat causes a lot of unnecessary events). (fat) . Fixed bug #55486 (status show BIG processes number). (fat) - . Fixed bug #55577 (status.html does not install). (fat) - . Backported from 5.4 branch (Dropped restriction of not setting the same -value multiple times, the last one holds). -(giovanni at giacobbi dot net, fat) - . Backported FR #55166 from 5.4 branch (Added process.max to control -the number of process FPM can fork). (fat) - . Backported FR #55181 from 5.4 branch (Enhance security by limiting access -to user defined extensions). (fat) - . Backported FR #54098 from 5.4 branch (Lowered process manager -default value). (fat) - . Backported FR #52052 from 5.4 branch (Added partial syslog support). (fat) + . Enhanced security by limiting access to user defined extensions. +FR #55181. (fat) + . Added process.max to control the number of process FPM can fork. FR #55166. +(fat) . Implemented FR #54577 (Enhanced status page with full status and details about each processes. Also provide a web page (status.html) for real-time FPM status. (fat) - . Enhance error log when the primary script can't be open. FR #60199. (fat) - . Added .phar to default authorized extensions. (fat) + . Lowered default value for Process Manager. FR #54098. (fat) + . Implemented FR #52569 (Add the "ondemand" process-manager +to allow zero children). (fat) + . Added partial syslog support (on error_log only). FR #52052. (fat) - Postgres: . Fixed bug #60244 (pg_fetch_* functions do not validate that row param @@ -820,7 +818,7 @@ - Tokenizer Extension . Fixed bug #54089 (token_get_all() does not stop after __halt_compiler). -(Ilia) +(Nikita Popov, Ilia) - XSL extension: . Fixed memory leaked introduced by the NULL poisoning patch. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Tue, Feb 28, 2012 at 10:38 AM, Xinchen Hui wrote: > On Tue, Feb 28, 2012 at 1:10 AM, Anthony Ferrara wrote: >> I initially looked at the final fix when I discovered the issue. >> Follow me out on this. This is the current code as-implemented in >> r323563: >> >> 265 zval *obj; >> 266 MAKE_STD_ZVAL(obj); >> 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type >> TSRMLS_CC) == SUCCESS) { >> 268 zval_ptr_dtor(arg); >> 269 *arg = obj; >> 270 *pl = Z_STRLEN_PP(arg); >> 271 *p = Z_STRVAL_PP(arg); >> 272 return SUCCESS; >> 273 } >> 274 efree(obj); >> >> The issue that I originally identified (overwriting the argument >> pointer) is still happening. Is there any reason for overwriting the >> arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and >> Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well > Oops, you are right.. thanks for pointing this out. > :) Sorry, I miss-read your words. so I revoke my previous words. the reason for why overwriting arg, is we should record that new temp zval(IS_STRING), then release it while doing cleanup parameters. and also, fo 5.3, no p and pl paramters. thanks >> (instead of efree, as that way if a reference is stored somewhere it >> won't result in a double free, or a segfault for accessing freed >> memory)? >> >> Thanks, >> >> Anthony >> >> On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui wrote: >>> Sent from my iPad >>> >>> 在 2012-2-28,0:10,Anthony Ferrara 写道: >>> Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to >>> plz look at the final fix: r323563 >>> >>> thanks r323563 Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch wrote: > On Mon, February 27, 2012 2:31 am, Laruence wrote: >> On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov >> wrote: >>> Hi Laruence, >>> >>> The attached patch looks wired. The patch on top of it (r323563) >>> makes it >>> better. However, in my opinion it fixes a common problem just in a >>> single >>> place. Each call to __toString() that makes "side effects" may cause >>> the >>> similar problem. It would be great to make a "right" fix in >>> zend_std_cast_object_tostring() itself, but probably it would >>> require API >> Hi: >> before this fix, I thought about the same idea of that. >> >> but, you know, such change will need all exts who implmented >> their own cast_object handler change there codes too. >> >> for now, I exam the usage of std_cast_object_tostring, most of >> them do the similar things like this fix to avoid this issues(like >> ZEND_CAST handler). >> >> so I think, maybe it's okey for a temporary fix :) > > Perhaps a better solution would be to make a NEW function that uses > zval** and deprecate the old one with memory leaks. > > Old extensions remain functional, new extension consume less memory. > > (This presumes I actually understand the issue, which is questionable.) > > -- > brain cancer update: > http://richardlynch.blogspot.com/search/label/brain%20tumor > Donate: > https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > 惠新宸 laruence > Senior PHP Engineer > http://www.laruence.com -- 惠新宸 laruence Senior PHP Engineer http://www.laruence.com -- PHP CVS Mailing List
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Tue, Feb 28, 2012 at 1:10 AM, Anthony Ferrara wrote: > I initially looked at the final fix when I discovered the issue. > Follow me out on this. This is the current code as-implemented in > r323563: > > 265 zval *obj; > 266 MAKE_STD_ZVAL(obj); > 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type > TSRMLS_CC) == SUCCESS) { > 268 zval_ptr_dtor(arg); > 269 *arg = obj; > 270 *pl = Z_STRLEN_PP(arg); > 271 *p = Z_STRVAL_PP(arg); > 272 return SUCCESS; > 273 } > 274 efree(obj); > > The issue that I originally identified (overwriting the argument > pointer) is still happening. Is there any reason for overwriting the > arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and > Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well Oops, you are right.. thanks for pointing this out. :) > (instead of efree, as that way if a reference is stored somewhere it > won't result in a double free, or a segfault for accessing freed > memory)? > > Thanks, > > Anthony > > On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui wrote: >> Sent from my iPad >> >> 在 2012-2-28,0:10,Anthony Ferrara 写道: >> >>> Out of curiosity, why are you changing it to copy the object for the >>> result of the cast operation? cast_object should init the result >>> zval, so why go through the step of copying the starting object to >> plz look at the final fix: r323563 >> >> thanks >>> r323563 >>> Wouldn't it be easier just to do: >>> >>> if (Z_OBJ_HANDLER_PP(arg, cast_object)) { >>> zval *result; >>> ALLOC_ZVAL(result); >>> if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) >>> == SUCCESS) { >>> zval_ptr_dtor(arg); >>> *pl = Z_STRLEN_PP(result); >>> *p = Z_STRVAL_PP(result); >>> zval_ptr_dtor(result); >>> return SUCCESS; >>> } >>> zval_ptr_dtor(result); >>> } >>> >>> Keeping both completely separate, and not having the possibility of >>> corrupting the arg object pointer? As it is right now (with the patch >>> in the first mail), wouldn't the possibility still exist of nuking the >>> arg object pointer which could be used elsewhere (and hence cause the >>> memory leak and segfault when that variable is referenced again)? >>> >>> (Un tested as of yet, just throwing it out there as it seems kind of >>> weird to overwrite the arg pointer for what seems like no reason)... >>> >>> Anthony >>> >>> >>> >>> On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch wrote: On Mon, February 27, 2012 2:31 am, Laruence wrote: > On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov > wrote: >> Hi Laruence, >> >> The attached patch looks wired. The patch on top of it (r323563) >> makes it >> better. However, in my opinion it fixes a common problem just in a >> single >> place. Each call to __toString() that makes "side effects" may cause >> the >> similar problem. It would be great to make a "right" fix in >> zend_std_cast_object_tostring() itself, but probably it would >> require API > Hi: > before this fix, I thought about the same idea of that. > > but, you know, such change will need all exts who implmented > their own cast_object handler change there codes too. > > for now, I exam the usage of std_cast_object_tostring, most of > them do the similar things like this fix to avoid this issues(like > ZEND_CAST handler). > > so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- 惠新宸 laruence Senior PHP Engineer http://www.laruence.com -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
I initially looked at the final fix when I discovered the issue. Follow me out on this. This is the current code as-implemented in r323563: 265 zval *obj; 266 MAKE_STD_ZVAL(obj); 267 if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { 268 zval_ptr_dtor(arg); 269 *arg = obj; 270 *pl = Z_STRLEN_PP(arg); 271 *p = Z_STRVAL_PP(arg); 272 return SUCCESS; 273 } 274 efree(obj); The issue that I originally identified (overwriting the argument pointer) is still happening. Is there any reason for overwriting the arg pointer? Wouldn't it be better to just do the Z_STRLEN_PP and Z_STRVAL_PP operations on obj instead, and zval_ptr_dtor it as well (instead of efree, as that way if a reference is stored somewhere it won't result in a double free, or a segfault for accessing freed memory)? Thanks, Anthony On Mon, Feb 27, 2012 at 11:39 AM, Xinchen Hui wrote: > Sent from my iPad > > 在 2012-2-28,0:10,Anthony Ferrara 写道: > >> Out of curiosity, why are you changing it to copy the object for the >> result of the cast operation? cast_object should init the result >> zval, so why go through the step of copying the starting object to > plz look at the final fix: r323563 > > thanks >> r323563 >> Wouldn't it be easier just to do: >> >> if (Z_OBJ_HANDLER_PP(arg, cast_object)) { >> zval *result; >> ALLOC_ZVAL(result); >> if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) >> == SUCCESS) { >> zval_ptr_dtor(arg); >> *pl = Z_STRLEN_PP(result); >> *p = Z_STRVAL_PP(result); >> zval_ptr_dtor(result); >> return SUCCESS; >> } >> zval_ptr_dtor(result); >> } >> >> Keeping both completely separate, and not having the possibility of >> corrupting the arg object pointer? As it is right now (with the patch >> in the first mail), wouldn't the possibility still exist of nuking the >> arg object pointer which could be used elsewhere (and hence cause the >> memory leak and segfault when that variable is referenced again)? >> >> (Un tested as of yet, just throwing it out there as it seems kind of >> weird to overwrite the arg pointer for what seems like no reason)... >> >> Anthony >> >> >> >> On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch wrote: >>> On Mon, February 27, 2012 2:31 am, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov wrote: > Hi Laruence, > > The attached patch looks wired. The patch on top of it (r323563) > makes it > better. However, in my opinion it fixes a common problem just in a > single > place. Each call to __toString() that makes "side effects" may cause > the > similar problem. It would be great to make a "right" fix in > zend_std_cast_object_tostring() itself, but probably it would > require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) >>> >>> Perhaps a better solution would be to make a NEW function that uses >>> zval** and deprecate the old one with memory leaks. >>> >>> Old extensions remain functional, new extension consume less memory. >>> >>> (This presumes I actually understand the issue, which is questionable.) >>> >>> -- >>> brain cancer update: >>> http://richardlynch.blogspot.com/search/label/brain%20tumor >>> Donate: >>> https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE >>> >>> >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Sent from my iPad 在 2012-2-28,0:10,Anthony Ferrara 写道: > Out of curiosity, why are you changing it to copy the object for the > result of the cast operation? cast_object should init the result > zval, so why go through the step of copying the starting object to plz look at the final fix: r323563 thanks > r323563 > Wouldn't it be easier just to do: > >if (Z_OBJ_HANDLER_PP(arg, cast_object)) { >zval *result; >ALLOC_ZVAL(result); >if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) > == SUCCESS) { >zval_ptr_dtor(arg); >*pl = Z_STRLEN_PP(result); >*p = Z_STRVAL_PP(result); >zval_ptr_dtor(result); >return SUCCESS; >} >zval_ptr_dtor(result); >} > > Keeping both completely separate, and not having the possibility of > corrupting the arg object pointer? As it is right now (with the patch > in the first mail), wouldn't the possibility still exist of nuking the > arg object pointer which could be used elsewhere (and hence cause the > memory leak and segfault when that variable is referenced again)? > > (Un tested as of yet, just throwing it out there as it seems kind of > weird to overwrite the arg pointer for what seems like no reason)... > > Anthony > > > > On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch wrote: >> On Mon, February 27, 2012 2:31 am, Laruence wrote: >>> On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov >>> wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes "side effects" may cause the similar problem. It would be great to make a "right" fix in zend_std_cast_object_tostring() itself, but probably it would require API >>> Hi: >>>before this fix, I thought about the same idea of that. >>> >>>but, you know, such change will need all exts who implmented >>> their own cast_object handler change there codes too. >>> >>>for now, I exam the usage of std_cast_object_tostring, most of >>> them do the similar things like this fix to avoid this issues(like >>> ZEND_CAST handler). >>> >>>so I think, maybe it's okey for a temporary fix :) >> >> Perhaps a better solution would be to make a NEW function that uses >> zval** and deprecate the old one with memory leaks. >> >> Old extensions remain functional, new extension consume less memory. >> >> (This presumes I actually understand the issue, which is questionable.) >> >> -- >> brain cancer update: >> http://richardlynch.blogspot.com/search/label/brain%20tumor >> Donate: >> https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE >> >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Out of curiosity, why are you changing it to copy the object for the result of the cast operation? cast_object should init the result zval, so why go through the step of copying the starting object to it? Wouldn't it be easier just to do: if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *result; ALLOC_ZVAL(result); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, result, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *pl = Z_STRLEN_PP(result); *p = Z_STRVAL_PP(result); zval_ptr_dtor(result); return SUCCESS; } zval_ptr_dtor(result); } Keeping both completely separate, and not having the possibility of corrupting the arg object pointer? As it is right now (with the patch in the first mail), wouldn't the possibility still exist of nuking the arg object pointer which could be used elsewhere (and hence cause the memory leak and segfault when that variable is referenced again)? (Un tested as of yet, just throwing it out there as it seems kind of weird to overwrite the arg pointer for what seems like no reason)... Anthony On Mon, Feb 27, 2012 at 10:22 AM, Richard Lynch wrote: > On Mon, February 27, 2012 2:31 am, Laruence wrote: >> On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov >> wrote: >>> Hi Laruence, >>> >>> The attached patch looks wired. The patch on top of it (r323563) >>> makes it >>> better. However, in my opinion it fixes a common problem just in a >>> single >>> place. Each call to __toString() that makes "side effects" may cause >>> the >>> similar problem. It would be great to make a "right" fix in >>> zend_std_cast_object_tostring() itself, but probably it would >>> require API >> Hi: >> before this fix, I thought about the same idea of that. >> >> but, you know, such change will need all exts who implmented >> their own cast_object handler change there codes too. >> >> for now, I exam the usage of std_cast_object_tostring, most of >> them do the similar things like this fix to avoid this issues(like >> ZEND_CAST handler). >> >> so I think, maybe it's okey for a temporary fix :) > > Perhaps a better solution would be to make a NEW function that uses > zval** and deprecate the old one with memory leaks. > > Old extensions remain functional, new extension consume less memory. > > (This presumes I actually understand the issue, which is questionable.) > > -- > brain cancer update: > http://richardlynch.blogspot.com/search/label/brain%20tumor > Donate: > https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, February 27, 2012 2:31 am, Laruence wrote: > On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov > wrote: >> Hi Laruence, >> >> The attached patch looks wired. The patch on top of it (r323563) >> makes it >> better. However, in my opinion it fixes a common problem just in a >> single >> place. Each call to __toString() that makes "side effects" may cause >> the >> similar problem. It would be great to make a "right" fix in >> zend_std_cast_object_tostring() itself, but probably it would >> require API > Hi: >before this fix, I thought about the same idea of that. > >but, you know, such change will need all exts who implmented > their own cast_object handler change there codes too. > >for now, I exam the usage of std_cast_object_tostring, most of > them do the similar things like this fix to avoid this issues(like > ZEND_CAST handler). > >so I think, maybe it's okey for a temporary fix :) Perhaps a better solution would be to make a NEW function that uses zval** and deprecate the old one with memory leaks. Old extensions remain functional, new extension consume less memory. (This presumes I actually understand the issue, which is questionable.) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE -- 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/main/php.h trunk/main/php.h
rasmus Mon, 27 Feb 2012 12:16:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=323577 Log: Fix bug 61193 Bug: https://bugs.php.net/61193 (Open) PHP_EOL definition for Mac OS X is wrong and unused Changed paths: U php/php-src/branches/PHP_5_3/main/php.h U php/php-src/trunk/main/php.h Modified: php/php-src/branches/PHP_5_3/main/php.h === --- php/php-src/branches/PHP_5_3/main/php.h 2012-02-27 11:30:03 UTC (rev 323576) +++ php/php-src/branches/PHP_5_3/main/php.h 2012-02-27 12:16:39 UTC (rev 323577) @@ -60,15 +60,10 @@ # else # define PHPAPI # endif - -#define THREAD_LS -#define PHP_DIR_SEPARATOR '/' -#if defined(__MacOSX__) -#define PHP_EOL "\r" -#else -#define PHP_EOL "\n" +# define THREAD_LS +# define PHP_DIR_SEPARATOR '/' +# define PHP_EOL "\n" #endif -#endif #ifdef NETWARE /* For php_get_uname() function */ Modified: php/php-src/trunk/main/php.h === --- php/php-src/trunk/main/php.h2012-02-27 11:30:03 UTC (rev 323576) +++ php/php-src/trunk/main/php.h2012-02-27 12:16:39 UTC (rev 323577) @@ -60,15 +60,10 @@ # else # define PHPAPI # endif - -#define THREAD_LS -#define PHP_DIR_SEPARATOR '/' -#if defined(__MacOSX__) -#define PHP_EOL "\r" -#else -#define PHP_EOL "\n" +# define THREAD_LS +# define PHP_DIR_SEPARATOR '/' +# define PHP_EOL "\n" #endif -#endif #ifdef NETWARE /* For php_get_uname() function */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 11:17 AM, Derick Rethans wrote: > You can't break extension APIs between 5.4.0 and 5.4.1 either, API > changes can only into trunk. And ABI neither. -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, 27 Feb 2012, Laruence wrote: > On Mon, Feb 27, 2012 at 4:31 PM, Laruence wrote: > > On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov wrote: > >> > >> The attached patch looks wired. The patch on top of it (r323563) makes it > >> better. However, in my opinion it fixes a common problem just in a single > >> place. Each call to __toString() that makes "side effects" may cause the > >> similar problem. It would be great to make a "right" fix in > >> zend_std_cast_object_tostring() itself, but probably it would require API > > Hi: > > before this fix, I thought about the same idea of that. > > > > but, you know, such change will need all exts who implmented > > their own cast_object handler change there codes too. > > > > for now, I exam the usage of std_cast_object_tostring, most of > > them do the similar things like this fix to avoid this issues(like > > ZEND_CAST handler). > > > > so I think, maybe it's okey for a temporary fix :) > > what I mean temporary is, apply this fix to 5.3 and 5.4 > > then do the "right" fix which you said to 5.4.1 :) You can't break extension APIs between 5.4.0 and 5.4.1 either, API changes can only into trunk. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On 02/27/2012 12:37 PM, Laruence wrote: On Mon, Feb 27, 2012 at 4:31 PM, Laruence wrote: On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov wrote: Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes "side effects" may cause the similar problem. It would be great to make a "right" fix in zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) what I mean temporary is, apply this fix to 5.3 and 5.4 then do the "right" fix which you said to 5.4.1 :) we won't be able to change API in 5.4.1, so it's for 5.5. Thanks. Dmitry. thanks thanks change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce->cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Huiwrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==&std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 4:31 PM, Laruence wrote: > On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov wrote: >> Hi Laruence, >> >> The attached patch looks wired. The patch on top of it (r323563) makes it >> better. However, in my opinion it fixes a common problem just in a single >> place. Each call to __toString() that makes "side effects" may cause the >> similar problem. It would be great to make a "right" fix in >> zend_std_cast_object_tostring() itself, but probably it would require API > Hi: > before this fix, I thought about the same idea of that. > > but, you know, such change will need all exts who implmented > their own cast_object handler change there codes too. > > for now, I exam the usage of std_cast_object_tostring, most of > them do the similar things like this fix to avoid this issues(like > ZEND_CAST handler). > > so I think, maybe it's okey for a temporary fix :) what I mean temporary is, apply this fix to 5.3 and 5.4 then do the "right" fix which you said to 5.4.1 :) thanks > > thanks >> change (e.g. sending zval** instead of zval*). So it could be fixed properly >> only in trunk. >> >> Thanks. Dmitry. >> >> >> On 02/25/2012 08:41 AM, Laruence wrote: >>> >>> Dmitry: >>> you might want to review this fix. >>> >>> let me explain why crash before this fix. >>> >>> when doing parse_parameter, then convert the object to string by >>> calling the ce->cast_object, >>> >>> and passed the same pointer(although there was a separation), to >>> the cast_object.. >>> >>> then if __toString method stash $this somewhere, after the >>> parameters clean up, the $this pointer will be impending.. >>> >>> then in the next loop, the return_value will happen used the same >>> adress,, >>> >>> then balalala, cause the segfault.. >>> >>> sorry for my poor english, and hope I have made myself clearly, >>> if there is any question , plz write me. >>> >>> thanks >>> >>> On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==&std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
On Mon, Feb 27, 2012 at 4:00 PM, Dmitry Stogov wrote: > Hi Laruence, > > The attached patch looks wired. The patch on top of it (r323563) makes it > better. However, in my opinion it fixes a common problem just in a single > place. Each call to __toString() that makes "side effects" may cause the > similar problem. It would be great to make a "right" fix in > zend_std_cast_object_tostring() itself, but probably it would require API Hi: before this fix, I thought about the same idea of that. but, you know, such change will need all exts who implmented their own cast_object handler change there codes too. for now, I exam the usage of std_cast_object_tostring, most of them do the similar things like this fix to avoid this issues(like ZEND_CAST handler). so I think, maybe it's okey for a temporary fix :) thanks > change (e.g. sending zval** instead of zval*). So it could be fixed properly > only in trunk. > > Thanks. Dmitry. > > > On 02/25/2012 08:41 AM, Laruence wrote: >> >> Dmitry: >> you might want to review this fix. >> >> let me explain why crash before this fix. >> >> when doing parse_parameter, then convert the object to string by >> calling the ce->cast_object, >> >> and passed the same pointer(although there was a separation), to >> the cast_object.. >> >> then if __toString method stash $this somewhere, after the >> parameters clean up, the $this pointer will be impending.. >> >> then in the next loop, the return_value will happen used the same >> adress,, >> >> then balalala, cause the segfault.. >> >> sorry for my poor english, and hope I have made myself clearly, >> if there is any question , plz write me. >> >> thanks >> >> On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui wrote: >>> >>> laruence Sat, 25 Feb 2012 04:36:08 + >>> >>> Revision: http://svn.php.net/viewvc?view=revision&revision=323489 >>> >>> Log: >>> Fixed bug #61165 (Segfault - strip_tags()) >>> >>> Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() >>> >>> Changed paths: >>> U php/php-src/branches/PHP_5_3/NEWS >>> U php/php-src/branches/PHP_5_3/Zend/zend_API.c >>> U php/php-src/trunk/NEWS >>> U php/php-src/trunk/Zend/zend_API.c >>> >>> Modified: php/php-src/branches/PHP_5_3/NEWS >>> === >>> --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev >>> 323488) >>> +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev >>> 323489) >>> @@ -3,6 +3,7 @@ >>> ?? ??? 2012, PHP 5.3.11 >>> >>> - Core: >>> + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) >>> . Improved max_input_vars directive to check nested variables (Dmitry). >>> . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) >>> . Fixed bug #61072 (Memory leak when restoring an exception handler). >>> >>> Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c >>> === >>> --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 >>> 03:19:27 UTC (rev 323488) >>> +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 >>> 04:36:08 UTC (rev 323489) >>> @@ -254,10 +254,15 @@ >>> static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ >>> { >>> if (Z_OBJ_HANDLER_PP(arg, cast_object)) { >>> - SEPARATE_ZVAL_IF_NOT_REF(arg); >>> - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, >>> IS_STRING TSRMLS_CC) == SUCCESS) { >>> + zval *obj; >>> + ALLOC_ZVAL(obj); >>> + MAKE_COPY_ZVAL(arg, obj); >>> + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, >>> IS_STRING TSRMLS_CC) == SUCCESS) { >>> + zval_ptr_dtor(arg); >>> + *arg = obj; >>> return SUCCESS; >>> } >>> + zval_ptr_dtor(&obj); >>> } >>> /* Standard PHP objects */ >>> if (Z_OBJ_HT_PP(arg) ==&std_object_handlers || >>> !Z_OBJ_HANDLER_PP(arg, cast_object)) { >>> >>> >>> Modified: php/php-src/trunk/NEWS >>> === >>> --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) >>> +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) >>> @@ -6,6 +6,7 @@ >>> . World domination >>> >>> - Core: >>> + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) >>> . Fixed bug #61072 (Memory leak when restoring an exception handler). >>> (Nikic, Laruence) >>> . Fixed bug #61000 (Exceeding max nesting level doesn't delete >>> numerical >>> >>> Modified: php/php-src/trunk/Zend/zend_API.c >>> === >>> --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev >>> 323488) >>> +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev >>> 323489) >>>
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Hi Laruence, The attached patch looks wired. The patch on top of it (r323563) makes it better. However, in my opinion it fixes a common problem just in a single place. Each call to __toString() that makes "side effects" may cause the similar problem. It would be great to make a "right" fix in zend_std_cast_object_tostring() itself, but probably it would require API change (e.g. sending zval** instead of zval*). So it could be fixed properly only in trunk. Thanks. Dmitry. On 02/25/2012 08:41 AM, Laruence wrote: Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce->cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui wrote: laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) ==&std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; *pl = Z_STRLEN_PP(arg); *p = Z_STRVAL_PP(arg); return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_API.c trunk/Zend/zend_API.c
laruence Sun, 26 Feb 2012 14:56:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=323563 Log: Improve fix for #61165, the previous one cause #43450 test failed Bugs: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() https://bugs.php.net/43450 (Closed) Memory leak on some functions with implicit object __toString() call Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-26 10:48:50 UTC (rev 323562) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-26 14:56:26 UTC (rev 323563) @@ -255,14 +255,13 @@ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *obj; - ALLOC_ZVAL(obj); - MAKE_COPY_ZVAL(arg, obj); + MAKE_STD_ZVAL(obj); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *arg = obj; return SUCCESS; } - zval_ptr_dtor(&obj); + efree(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-26 10:48:50 UTC (rev 323562) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-26 14:56:26 UTC (rev 323563) @@ -263,8 +263,7 @@ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { zval *obj; - ALLOC_ZVAL(obj); - MAKE_COPY_ZVAL(arg, obj); + MAKE_STD_ZVAL(obj); if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { zval_ptr_dtor(arg); *arg = obj; @@ -272,7 +271,7 @@ *p = Z_STRVAL_PP(arg); return SUCCESS; } - zval_ptr_dtor(&obj); + efree(obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/bug61124.phpt branches/PHP_5_4/ext/openssl/tests/bug61124.phpt trunk/ext/openssl/tests/bug61124.phpt
odoucet Sat, 25 Feb 2012 13:27:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=323509 Log: test for bug #61124 Bug: https://bugs.php.net/61124 (Closed) Segmentation fault Changed paths: A php/php-src/branches/PHP_5_3/ext/openssl/tests/bug61124.phpt A php/php-src/branches/PHP_5_4/ext/openssl/tests/bug61124.phpt A php/php-src/trunk/ext/openssl/tests/bug61124.phpt Added: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug61124.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug61124.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug61124.phpt 2012-02-25 13:27:57 UTC (rev 323509) @@ -0,0 +1,12 @@ +--TEST-- +Bug #61124: Segmentation fault with openssl_decrypt +--SKIPIF-- +-- 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
nikicSat, 25 Feb 2012 13:04:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=323506 Log: NEWS for r323330 So cjones doesn't have nightmares :P 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 2012-02-25 13:03:53 UTC (rev 323505) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 13:04:43 UTC (rev 323506) @@ -26,6 +26,9 @@ - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). +- Phar: + . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL bytes). (Nikic) + - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) -- 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/streams/bug47997.phpt trunk/ext/standard/tests/streams/bug47997.phpt
odoucet Sat, 25 Feb 2012 12:44:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=323504 Log: fix phpt : fopen(data://) requires allow_url_fopen=1 Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug47997.phpt U php/php-src/trunk/ext/standard/tests/streams/bug47997.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug47997.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug47997.phpt 2012-02-25 12:27:38 UTC (rev 323503) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug47997.phpt 2012-02-25 12:44:46 UTC (rev 323504) @@ -1,5 +1,7 @@ --TEST-- Bug #47997 (stream_copy_to_stream returns 1 on empty streams) +--INI-- +allow_url_fopen=1 --FILE-- -- 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/tests/bug34199.phpt branches/PHP_5_3/Zend/tests/bug39602.phpt branches/PHP_5_3/Zend/tests/bug42819.phpt branches/PHP_5_3/Zend/tests/bug43918.phpt bra
odoucet Sat, 25 Feb 2012 12:10:41 + Revision: http://svn.php.net/viewvc?view=revision&revision=323501 Log: more verbose skip reason in test files with not so obvious extension requirements Changed paths: U php/php-src/branches/PHP_5_3/Zend/tests/bug34199.phpt U php/php-src/branches/PHP_5_3/Zend/tests/bug39602.phpt U php/php-src/branches/PHP_5_3/Zend/tests/bug42819.phpt U php/php-src/branches/PHP_5_3/Zend/tests/bug43918.phpt U php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt U php/php-src/branches/PHP_5_3/Zend/tests/gc_024.phpt U php/php-src/branches/PHP_5_3/Zend/tests/unset_cv10.phpt U php/php-src/branches/PHP_5_3/ext/soap/tests/bugs/bug34657.phpt U php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_006.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/streams/stream_get_line_nb.phpt U php/php-src/branches/PHP_5_3/ext/xmlreader/tests/expand.phpt U php/php-src/branches/PHP_5_3/sapi/cli/tests/004.phpt U php/php-src/branches/PHP_5_3/sapi/cli/tests/005.phpt U php/php-src/branches/PHP_5_3/sapi/cli/tests/006.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug34199.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug39602.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug42819.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug43918.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug50174.phpt U php/php-src/branches/PHP_5_4/Zend/tests/gc_024.phpt U php/php-src/branches/PHP_5_4/Zend/tests/unset_cv10.phpt U php/php-src/branches/PHP_5_4/ext/soap/tests/bugs/bug34657.phpt U php/php-src/branches/PHP_5_4/ext/spl/tests/iterator_006.phpt U php/php-src/branches/PHP_5_4/ext/standard/tests/streams/stream_get_line_nb.phpt U php/php-src/branches/PHP_5_4/ext/xmlreader/tests/expand.phpt U php/php-src/branches/PHP_5_4/sapi/cli/tests/004.phpt U php/php-src/branches/PHP_5_4/sapi/cli/tests/005.phpt U php/php-src/branches/PHP_5_4/sapi/cli/tests/006.phpt U php/php-src/branches/PHP_5_4/tests/output/bug60282.phpt U php/php-src/trunk/Zend/tests/bug34199.phpt U php/php-src/trunk/Zend/tests/bug39602.phpt U php/php-src/trunk/Zend/tests/bug42819.phpt U php/php-src/trunk/Zend/tests/bug43918.phpt U php/php-src/trunk/Zend/tests/bug50174.phpt U php/php-src/trunk/Zend/tests/gc_024.phpt U php/php-src/trunk/Zend/tests/unset_cv10.phpt U php/php-src/trunk/ext/soap/tests/bugs/bug34657.phpt U php/php-src/trunk/ext/spl/tests/iterator_006.phpt U php/php-src/trunk/ext/standard/tests/streams/stream_get_line_nb.phpt U php/php-src/trunk/ext/xmlreader/tests/expand.phpt U php/php-src/trunk/sapi/cli/tests/004.phpt U php/php-src/trunk/sapi/cli/tests/005.phpt U php/php-src/trunk/sapi/cli/tests/006.phpt U php/php-src/trunk/tests/output/bug60282.phpt Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug34199.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug34199.phpt 2012-02-25 12:10:07 UTC (rev 323500) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug34199.phpt 2012-02-25 12:10:41 UTC (rev 323501) @@ -1,7 +1,7 @@ --TEST-- Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler) --SKIPIF-- - + --FILE-- "; Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug39602.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug39602.phpt 2012-02-25 12:10:07 UTC (rev 323500) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug39602.phpt 2012-02-25 12:10:41 UTC (rev 323501) @@ -1,7 +1,7 @@ --TEST-- Bug #39602 (Invalid session.save_handler crashes PHP) --SKIPIF-- - + --INI-- session.save_handler=qwerty error_reporting=0 Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug42819.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug42819.phpt 2012-02-25 12:10:07 UTC (rev 323500) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug42819.phpt 2012-02-25 12:10:41 UTC (rev 323501) @@ -1,7 +1,7 @@ --TEST-- Bug #42819 (namespaces in indexes of constant arrays) --SKIPIF-- - + --FILE-- + --FILE-- + --FILE-- + --FILE-- + --FILE-- --FILE-- Modified: php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_006.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_006.phpt 2012-02-25 12:10:07 UTC (rev 323500) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_006.phpt 2012-02-25 12:10:41 UTC (rev 323501) @@ -1,7 +1,7 @@ --TEST-- SPL: IteratorIterator and SimpleXMlElement --SKIPIF-- - + --FILE-- Modified: php/php-src/branches/PHP_5_3/ext/xmlreader/tests/expand.phpt === --- php/php-src/branches/PHP_5_3/ext/xml
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/tests/bug61165.phpt trunk/Zend/tests/bug61165.phpt
laruence Sat, 25 Feb 2012 05:18:40 + Revision: http://svn.php.net/viewvc?view=revision&revision=323490 Log: merge test to 5.3, and remove xfail since the bug was fixed Changed paths: A php/php-src/branches/PHP_5_3/Zend/tests/bug61165.phpt U php/php-src/trunk/Zend/tests/bug61165.phpt Added: php/php-src/branches/PHP_5_3/Zend/tests/bug61165.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug61165.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug61165.phpt 2012-02-25 05:18:40 UTC (rev 323490) @@ -0,0 +1,28 @@ +--TEST-- +Bug #61165 (Segfault - strip_tags()) +--FILE-- +_this = $this; // <-- uncoment this +return 'A'; +} +} + +$t = new T; +for ($i = 0; $i < 3; $i++) { +strip_tags($t); + strip_tags(new T); +} +var_dump($handler); +--EXPECTF-- +object(T)#%d (1) { + ["_this"]=> + *RECURSION* +} Modified: php/php-src/trunk/Zend/tests/bug61165.phpt === --- php/php-src/trunk/Zend/tests/bug61165.phpt 2012-02-25 04:36:08 UTC (rev 323489) +++ php/php-src/trunk/Zend/tests/bug61165.phpt 2012-02-25 05:18:40 UTC (rev 323490) @@ -1,7 +1,5 @@ --TEST-- Bug #61165 (Segfault - strip_tags()) ---XFAIL-- -#61165 doesn't fix yet --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
Dmitry: you might want to review this fix. let me explain why crash before this fix. when doing parse_parameter, then convert the object to string by calling the ce->cast_object, and passed the same pointer(although there was a separation), to the cast_object.. then if __toString method stash $this somewhere, after the parameters clean up, the $this pointer will be impending.. then in the next loop, the return_value will happen used the same adress,, then balalala, cause the segfault.. sorry for my poor english, and hope I have made myself clearly, if there is any question , plz write me. thanks On Sat, Feb 25, 2012 at 12:36 PM, Xinchen Hui wrote: > laruence Sat, 25 Feb 2012 04:36:08 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323489 > > Log: > Fixed bug #61165 (Segfault - strip_tags()) > > Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_3/Zend/zend_API.c > U php/php-src/trunk/NEWS > U php/php-src/trunk/Zend/zend_API.c > > Modified: php/php-src/branches/PHP_5_3/NEWS > === > --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) > +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) > @@ -3,6 +3,7 @@ > ?? ??? 2012, PHP 5.3.11 > > - Core: > + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) > . Improved max_input_vars directive to check nested variables (Dmitry). > . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) > . Fixed bug #61072 (Memory leak when restoring an exception handler). > > Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c > === > --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 03:19:27 > UTC (rev 323488) > +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2012-02-25 04:36:08 > UTC (rev 323489) > @@ -254,10 +254,15 @@ > static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ > { > if (Z_OBJ_HANDLER_PP(arg, cast_object)) { > - SEPARATE_ZVAL_IF_NOT_REF(arg); > - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING > TSRMLS_CC) == SUCCESS) { > + zval *obj; > + ALLOC_ZVAL(obj); > + MAKE_COPY_ZVAL(arg, obj); > + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING > TSRMLS_CC) == SUCCESS) { > + zval_ptr_dtor(arg); > + *arg = obj; > return SUCCESS; > } > + zval_ptr_dtor(&obj); > } > /* Standard PHP objects */ > if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, > cast_object)) { > > Modified: php/php-src/trunk/NEWS > === > --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) > +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) > @@ -6,6 +6,7 @@ > . World domination > > - Core: > + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) > . Fixed bug #61072 (Memory leak when restoring an exception handler). > (Nikic, Laruence) > . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical > > Modified: php/php-src/trunk/Zend/zend_API.c > === > --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) > +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) > @@ -262,12 +262,17 @@ > static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int > type TSRMLS_DC) /* {{{ */ > { > if (Z_OBJ_HANDLER_PP(arg, cast_object)) { > - SEPARATE_ZVAL_IF_NOT_REF(arg); > - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type > TSRMLS_CC) == SUCCESS) { > + zval *obj; > + ALLOC_ZVAL(obj); > + MAKE_COPY_ZVAL(arg, obj); > + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type > TSRMLS_CC) == SUCCESS) { > + zval_ptr_dtor(arg); > + *arg = obj; > *pl = Z_STRLEN_PP(arg); > *p = Z_STRVAL_PP(arg); > return SUCCESS; > } > + zval_ptr_dtor(&obj); > } > /* Standard PHP objects */ > if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, > cast_object)) { > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_API.c trunk/NEWS trunk/Zend/zend_API.c
laruence Sat, 25 Feb 2012 04:36:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=323489 Log: Fixed bug #61165 (Segfault - strip_tags()) Bug: https://bugs.php.net/61165 (Assigned) Segfault - strip_tags() Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/zend_API.c U php/php-src/trunk/NEWS U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -3,6 +3,7 @@ ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) . Fixed bug #61072 (Memory leak when restoring an exception handler). Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2012-02-25 04:36:08 UTC (rev 323489) @@ -254,10 +254,15 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, IS_STRING TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/NEWS 2012-02-25 04:36:08 UTC (rev 323489) @@ -6,6 +6,7 @@ . World domination - Core: + . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2012-02-25 03:19:27 UTC (rev 323488) +++ php/php-src/trunk/Zend/zend_API.c 2012-02-25 04:36:08 UTC (rev 323489) @@ -262,12 +262,17 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */ { if (Z_OBJ_HANDLER_PP(arg, cast_object)) { - SEPARATE_ZVAL_IF_NOT_REF(arg); - if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) { + zval *obj; + ALLOC_ZVAL(obj); + MAKE_COPY_ZVAL(arg, obj); + if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) { + zval_ptr_dtor(arg); + *arg = obj; *pl = Z_STRLEN_PP(arg); *p = Z_STRVAL_PP(arg); return SUCCESS; } + zval_ptr_dtor(&obj); } /* Standard PHP objects */ if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/streamsfuncs.c branches/PHP_5_3/main/streams/streams.c trunk/ext/standard/streamsfuncs.c trunk/main/streams/streams.c
cataphract Fri, 24 Feb 2012 22:56:21 + Revision: http://svn.php.net/viewvc?view=revision&revision=323478 Log: - Better fix for #61115. - Fixed resource leak in stream_socket_client(). Bug: https://bugs.php.net/61115 (Closed) Stream related segfault on fatal error in php_stream_context_del_link Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/trunk/ext/standard/streamsfuncs.c U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c === --- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2012-02-24 20:11:11 UTC (rev 323477) +++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2012-02-24 22:56:21 UTC (rev 323478) @@ -106,10 +106,6 @@ context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); - if (context) { - zend_list_addref(context->rsrc_id); - } - if (flags & PHP_STREAM_CLIENT_PERSISTENT) { spprintf(&hashkey, 0, "stream_socket_client__%s", host); } Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-24 20:11:11 UTC (rev 323477) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-24 22:56:21 UTC (rev 323478) @@ -320,10 +320,15 @@ int remove_rsrc = 1; int preserve_handle = close_options & PHP_STREAM_FREE_PRESERVE_HANDLE ? 1 : 0; int release_cast = 1; - /* on an unclean shutdown, the context may have already been freed (if it -* was created after the stream resource), so don't reference it */ - php_stream_context *context = CG(unclean_shutdown) ? NULL : stream->context; + php_stream_context *context = NULL; + /* on an resource list destruction, the context, another resource, may have +* already been freed (if it was created after the stream resource), so +* don't reference it */ + if (!(close_options & PHP_STREAM_FREE_RSRC_DTOR)) { + context = stream->context; + } + if (stream->flags & PHP_STREAM_FLAG_NO_CLOSE) { preserve_handle = 1; } Modified: php/php-src/trunk/ext/standard/streamsfuncs.c === --- php/php-src/trunk/ext/standard/streamsfuncs.c 2012-02-24 20:11:11 UTC (rev 323477) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2012-02-24 22:56:21 UTC (rev 323478) @@ -106,10 +106,6 @@ context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); - if (context) { - zend_list_addref(context->rsrc_id); - } - if (flags & PHP_STREAM_CLIENT_PERSISTENT) { spprintf(&hashkey, 0, "stream_socket_client__%s", host); } Modified: php/php-src/trunk/main/streams/streams.c === --- php/php-src/trunk/main/streams/streams.c2012-02-24 20:11:11 UTC (rev 323477) +++ php/php-src/trunk/main/streams/streams.c2012-02-24 22:56:21 UTC (rev 323478) @@ -366,10 +366,15 @@ int ret = 1; int preserve_handle = close_options & PHP_STREAM_FREE_PRESERVE_HANDLE ? 1 : 0; int release_cast = 1; - /* on an unclean shutdown, the context may have already been freed (if it -* was created after the stream resource), so don't reference it */ - php_stream_context *context = CG(unclean_shutdown) ? NULL : stream->context; + php_stream_context *context = NULL; + /* on an resource list destruction, the context, another resource, may have +* already been freed (if it was created after the stream resource), so +* don't reference it */ + if (!(close_options & PHP_STREAM_FREE_RSRC_DTOR)) { + context = stream->context; + } + if (stream->flags & PHP_STREAM_FLAG_NO_CLOSE) { preserve_handle = 1; } -- 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/fileinfo/fileinfo.c branches/PHP_5_3/ext/fileinfo/tests/bug61173.phpt trunk/ext/fileinfo/fileinfo.c trunk/ext/fileinfo/tests/bug
cataphract Fri, 24 Feb 2012 10:01:39 + Revision: http://svn.php.net/viewvc?view=revision&revision=323472 Log: - Fixed bug #61173 (Unable to detect error from finfo constructor). - Tidied up NEWS Bug: https://bugs.php.net/61173 (Feedback) Unable to detect error from finfo constructor Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c A php/php-src/branches/PHP_5_3/ext/fileinfo/tests/bug61173.phpt U php/php-src/trunk/ext/fileinfo/fileinfo.c A php/php-src/trunk/ext/fileinfo/tests/bug61173.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-24 10:01:32 UTC (rev 323471) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-24 10:01:39 UTC (rev 323472) @@ -1,22 +1,16 @@ PHPNEWS ||| ?? ??? 2012, PHP 5.3.11 + - Core: . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) - -- Session: - . Fixed bug #60860 (session.save_handler=user without defined function core -dumps). (Felipe) - -- Tidy: - . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra) - -- Core: . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) - . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars). -(Laruence) + . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). + (Laruence) + . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical + vars). (Laruence) . Fix bug #60895 (Possible invalid handler usage in windows random functions). (Pierre) . Fixed bug #60825 (Segfault when running symfony 2 tests). @@ -25,18 +19,12 @@ (rui, Gustavo) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) +- Fileinfo + . Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo) + - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). -- Streams: - . Fixed bug #61115 (stream related segfault on fatal error in -php_stream_context_link). (Gustavo) - . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected -together with the last read). (Gustavo) - . Fixed bug #60817 (stream_get_line() reads from stream even when there is -already sufficient data buffered). stream_get_line() now behaves more like -fgets(), as is documented. (Gustavo) - - PHP-FPM SAPI: . Fixed bug #60811 (php-fpm compilation problem). (rasmus) @@ -53,10 +41,22 @@ . Fixed bug #60968 (Late static binding doesn't work with ReflectionMethod::invokeArgs()). (Laruence) -- Array: - . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). -(Laruence) +- Session: + . Fixed bug #60860 (session.save_handler=user without defined function core +dumps). (Felipe) +- Streams: + . Fixed bug #61115 (stream related segfault on fatal error in +php_stream_context_link). (Gustavo) + . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not +detected together with the last read). (Gustavo) + . Fixed bug #60817 (stream_get_line() reads from stream even when there is +already sufficient data buffered). stream_get_line() now behaves more like +fgets(), as is documented. (Gustavo) + +- Tidy: + . Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra) + - XMLRPC: . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c === --- php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c 2012-02-24 10:01:32 UTC (rev 323471) +++ php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c 2012-02-24 10:01:39 UTC (rev 323472) @@ -76,9 +76,9 @@ } \ } -/* {{{ finfo_objects_dtor +/* {{{ finfo_objects_free */ -static void finfo_objects_dtor(void *object, zend_object_handle handle TSRMLS_DC) +static void finfo_objects_free(void *object TSRMLS_DC) { struct finfo_object *intern = (struct finfo_object *) object; @@ -108,7 +108,8 @@ intern->ptr = NULL; - retval.handle = zend_objects_store_put(intern, finfo_objects_dtor, NULL, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(intern, NULL, + finfo_objects_free, NULL TSRMLS_CC); retval.handlers = (zend_object_handlers *) &finfo_object_handlers; return retval; @@ -276,6 +277,15 @@ } /* }}} */ +#define FILEINFO_DESTROY_OBJECT(object) \ + do { \ + if (object) { \ + zend_object_store_ctor_failed(object TSRMLS_CC); \ + zval_dtor(object); \ + ZVAL_NULL(object)
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar_object.c trunk/ext/phar/phar_object.c
On 02/18/2012 05:39 AM, Nikita Popov wrote: nikicSat, 18 Feb 2012 13:39:13 + Revision: http://svn.php.net/viewvc?view=revision&revision=323330 Log: Fix headers generated by phar sapi_header_line.line_len is the length without null terminator, so one has to take sizeof - 1. This fixes some test failures as the NUL bytes were causing warnings. Needs to be merged to 5.4. Hi Nikita, This fix deserves a bug report - which will also help as a reminder for the 5.4 merge. And it will also add value to NEWS, since people will be able to find more information (via the bug report) than you could put in a one line NEWS entry. Chris -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
sixd Thu, 23 Feb 2012 19:43:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=323453 Log: Relocate orphan line 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 2012-02-23 18:43:05 UTC (rev 323452) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-23 19:43:38 UTC (rev 323453) @@ -242,9 +242,9 @@ - Phar: . Fixed bug #60261 (NULL pointer dereference in phar). (Felipe) . Fixed bug #60164 (Stubs of a specific length break phar_open_from_fp +scanning for __HALT_COMPILER). (Ralph Schindler) . Fixed bug #53872 (internal corruption of phar). (Hannes) . Fixed bug #52013 (Unable to decompress files in a compressed phar). (Hannes) -scanning for __HALT_COMPILER). (Ralph Schindler) - PHP-FPM SAPI: . Fixed bug #60659 (FPM does not clear auth_user on request accept). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
hi! Thanks for applying the patch! Please add the test case as well. Btw, did you check with Stas and David about 5.4? Not sure if it is OK at this stage, but we may need another RC already anyway (commits done since last RC). On Thu, Feb 23, 2012 at 2:26 AM, Scott MacVicar wrote: > scottmac Thu, 23 Feb 2012 01:26:46 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323440 > > Log: > Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). > > Bug: https://bugs.php.net/61124 (Assigned) Segmentation fault > > Changed paths: > U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c > U php/php-src/branches/PHP_5_4/NEWS > U php/php-src/branches/PHP_5_4/ext/openssl/openssl.c > U php/php-src/trunk/ext/openssl/openssl.c > > Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c > === > --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2012-02-22 23:42:18 > UTC (rev 323439) > +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2012-02-23 01:26:46 > UTC (rev 323440) > @@ -4776,6 +4776,10 @@ > > if (!raw_input) { > base64_str = (char*)php_base64_decode((unsigned char*)data, > data_len, &base64_str_len); > + if (!base64_str) { > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed > to base64 decode the input"); > + RETURN_FALSE; > + } > data_len = base64_str_len; > data = base64_str; > } > > Modified: php/php-src/branches/PHP_5_4/NEWS > === > --- php/php-src/branches/PHP_5_4/NEWS 2012-02-22 23:42:18 UTC (rev 323439) > +++ php/php-src/branches/PHP_5_4/NEWS 2012-02-23 01:26:46 UTC (rev 323440) > @@ -1,6 +1,9 @@ > PHP > NEWS > ||| > ?? ??? 2012, PHP 5.4.0 RC 9 > +- OpenSSL: > + . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). > + (me at ktamura dot com, Scott) > > 15 Feb 2012, PHP 5.4.0 RC 8 > - Core: > > Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c > === > --- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2012-02-22 23:42:18 > UTC (rev 323439) > +++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2012-02-23 01:26:46 > UTC (rev 323440) > @@ -4803,6 +4803,10 @@ > > if (!(options & OPENSSL_RAW_DATA)) { > base64_str = (char*)php_base64_decode((unsigned char*)data, > data_len, &base64_str_len); > + if (!base64_str) { > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed > to base64 decode the input"); > + RETURN_FALSE; > + } > data_len = base64_str_len; > data = base64_str; > } > > Modified: php/php-src/trunk/ext/openssl/openssl.c > === > --- php/php-src/trunk/ext/openssl/openssl.c 2012-02-22 23:42:18 UTC (rev > 323439) > +++ php/php-src/trunk/ext/openssl/openssl.c 2012-02-23 01:26:46 UTC (rev > 323440) > @@ -4799,6 +4799,10 @@ > > if (!(options & OPENSSL_RAW_DATA)) { > base64_str = (char*)php_base64_decode((unsigned char*)data, > data_len, &base64_str_len); > + if (!base64_str) { > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed > to base64 decode the input"); > + RETURN_FALSE; > + } > data_len = base64_str_len; > data = base64_str; > } > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/openssl.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
scottmac Thu, 23 Feb 2012 01:26:46 + Revision: http://svn.php.net/viewvc?view=revision&revision=323440 Log: Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). Bug: https://bugs.php.net/61124 (Assigned) Segmentation fault Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/openssl/openssl.c U php/php-src/trunk/ext/openssl/openssl.c Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2012-02-22 23:42:18 UTC (rev 323439) +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2012-02-23 01:26:46 UTC (rev 323440) @@ -4776,6 +4776,10 @@ if (!raw_input) { base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len); + if (!base64_str) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to base64 decode the input"); + RETURN_FALSE; + } data_len = base64_str_len; data = base64_str; } Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-02-22 23:42:18 UTC (rev 323439) +++ php/php-src/branches/PHP_5_4/NEWS 2012-02-23 01:26:46 UTC (rev 323440) @@ -1,6 +1,9 @@ PHPNEWS ||| ?? ??? 2012, PHP 5.4.0 RC 9 +- OpenSSL: + . Fixed bug #61124 (Crash when decoding an invalid base64 encoded string). +(me at ktamura dot com, Scott) 15 Feb 2012, PHP 5.4.0 RC 8 - Core: Modified: php/php-src/branches/PHP_5_4/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2012-02-22 23:42:18 UTC (rev 323439) +++ php/php-src/branches/PHP_5_4/ext/openssl/openssl.c 2012-02-23 01:26:46 UTC (rev 323440) @@ -4803,6 +4803,10 @@ if (!(options & OPENSSL_RAW_DATA)) { base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len); + if (!base64_str) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to base64 decode the input"); + RETURN_FALSE; + } data_len = base64_str_len; data = base64_str; } Modified: php/php-src/trunk/ext/openssl/openssl.c === --- php/php-src/trunk/ext/openssl/openssl.c 2012-02-22 23:42:18 UTC (rev 323439) +++ php/php-src/trunk/ext/openssl/openssl.c 2012-02-23 01:26:46 UTC (rev 323440) @@ -4799,6 +4799,10 @@ if (!(options & OPENSSL_RAW_DATA)) { base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len); + if (!base64_str) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to base64 decode the input"); + RETURN_FALSE; + } data_len = base64_str_len; data = base64_str; } -- 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
nikicWed, 22 Feb 2012 17:21:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=323432 Log: NEWS for r323362 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 2012-02-22 16:14:47 UTC (rev 323431) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-22 17:21:57 UTC (rev 323432) @@ -60,6 +60,9 @@ - XMLRPC: . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) +- Zlib: + . Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic) + 02 Feb 2012, PHP 5.3.10 - 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/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt branches/PHP_5_3/main/streams/streams.c trunk/ext/standard/tests/streams/bug61115.phpt trun
cataphract Wed, 22 Feb 2012 11:45:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=323425 Log: - Fixed bug #61115 (stream related segfault on fatal error in php_stream_context_link). #run-tests.php is not currently detecting the segfault in the test #Missing 5.4 merge Bug: https://bugs.php.net/61115 (Analyzed) Stream related segfault on fatal error in php_stream_context_del_link Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt U php/php-src/branches/PHP_5_3/main/streams/streams.c A php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-22 11:15:49 UTC (rev 323424) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-22 11:45:26 UTC (rev 323425) @@ -29,6 +29,8 @@ . Fixed bug #60802 (ibase_trans() gives segfault when passing params). - Streams: + . Fixed bug #61115 (stream related segfault on fatal error in +php_stream_context_link). (Gustavo) . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected together with the last read). (Gustavo) . Fixed bug #60817 (stream_get_line() reads from stream even when there is Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt 2012-02-22 11:45:26 UTC (rev 323425) @@ -0,0 +1,13 @@ +--TEST-- +Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link. +--FILE-- + +--EXPECTF-- +Catchable fatal error: Object of class Closure could not be converted to string in %s on line %d Property changes on: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug61115.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c === --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-22 11:15:49 UTC (rev 323424) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2012-02-22 11:45:26 UTC (rev 323425) @@ -320,7 +320,9 @@ int remove_rsrc = 1; int preserve_handle = close_options & PHP_STREAM_FREE_PRESERVE_HANDLE ? 1 : 0; int release_cast = 1; - php_stream_context *context = stream->context; + /* on an unclean shutdown, the context may have already been freed (if it +* was created after the stream resource), so don't reference it */ + php_stream_context *context = CG(unclean_shutdown) ? NULL : stream->context; if (stream->flags & PHP_STREAM_FLAG_NO_CLOSE) { preserve_handle = 1; @@ -374,8 +376,8 @@ } /* Remove stream from any context link list */ - if (stream->context && stream->context->links) { - php_stream_context_del_link(stream->context, stream); + if (context && context->links) { + php_stream_context_del_link(context, stream); } if (close_options & PHP_STREAM_FREE_CALL_DTOR) { Added: php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt === --- php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt (rev 0) +++ php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt 2012-02-22 11:45:26 UTC (rev 323425) @@ -0,0 +1,13 @@ +--TEST-- +Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link. +--FILE-- + +--EXPECTF-- +Catchable fatal error: Object of class Closure could not be converted to string in %s on line %d Property changes on: php/php-src/trunk/ext/standard/tests/streams/bug61115.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/trunk/main/streams/streams.c === --- php/php-src/trunk/main/streams/streams.c2012-02-22 11:15:49 UTC (rev 323424) +++ php/php-src/trunk/main/streams/streams.c2012-02-22 11:45:26 UTC (rev 323425) @@ -366,7 +366,9 @@ int ret = 1; int preserve_handle = close_options & PHP_STREAM_FREE_PRESERVE_HANDLE ? 1 : 0; int release_cast = 1; - php_stream_context *context = stream->context; + /* on an unclean shutdown, the context may have already been freed (if it +* was created after the stream resource), so don't ref
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/fpm/ php-fpm.conf.in
rasmus Tue, 21 Feb 2012 00:01:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=323396 Log: Yup, these need to be escaped. Good catch. Changed paths: U php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in Modified: php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in === --- php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-20 20:29:26 UTC (rev 323395) +++ php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-21 00:01:19 UTC (rev 323396) @@ -399,7 +399,7 @@ ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%%" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" ; The log file for slow requests ; Default Value: not set -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/fpm/ php-fpm.conf.in
On Mon, Feb 20, 2012 at 21:29, Rasmus Lerdorf wrote: > rasmus Mon, 20 Feb 2012 20:29:26 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323395 > > Log: > Fix bug 61149 > > Bug: https://bugs.php.net/61149 (Open) access.format directive should be in > quotation marks > > Changed paths: > U php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in > > Modified: php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in > === > --- php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-20 > 18:28:57 UTC (rev 323394) > +++ php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-20 > 20:29:26 UTC (rev 323395) > @@ -399,7 +399,7 @@ > ; %u: remote user > ; > ; Default: "%R - %u %t \"%m %r\" %s" > -;access.format = %R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%% > +;access.format = "%R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%%" That doesn't look right. Don't the inner " need to be escaped? -Hannes -- 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/sapi/fpm/ php-fpm.conf.in
rasmus Mon, 20 Feb 2012 20:29:26 + Revision: http://svn.php.net/viewvc?view=revision&revision=323395 Log: Fix bug 61149 Bug: https://bugs.php.net/61149 (Open) access.format directive should be in quotation marks Changed paths: U php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in Modified: php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in === --- php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-20 18:28:57 UTC (rev 323394) +++ php/php-src/branches/PHP_5_3/sapi/fpm/php-fpm.conf.in 2012-02-20 20:29:26 UTC (rev 323395) @@ -399,7 +399,7 @@ ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" -;access.format = %R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%% +;access.format = "%R - %u %t "%m %r%Q%q" %s %f %{mili}d %{kilo}M %C%%" ; The log file for slow requests ; Default Value: not 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/Makefile.gcov branches/PHP_5_4/Makefile.gcov trunk/Makefile.gcov
nlopess Mon, 20 Feb 2012 16:01:34 + Revision: http://svn.php.net/viewvc?view=revision&revision=323386 Log: fix race condition in find (it was finding the copied files over and over again, and recursing forever) Changed paths: U php/php-src/branches/PHP_5_3/Makefile.gcov U php/php-src/branches/PHP_5_4/Makefile.gcov U php/php-src/trunk/Makefile.gcov Modified: php/php-src/branches/PHP_5_3/Makefile.gcov === --- php/php-src/branches/PHP_5_3/Makefile.gcov 2012-02-20 15:22:27 UTC (rev 323385) +++ php/php-src/branches/PHP_5_3/Makefile.gcov 2012-02-20 16:01:34 UTC (rev 323386) @@ -12,7 +12,8 @@ @rm -rf lcov_data/ @$(mkinstalldirs) lcov_data/ @echo - -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \ + -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq` ;\ + for x in $$files; do \ echo -n . ;\ y=`echo $$x | sed -e 's!\.libs/!!'`; \ dir=lcov_data/`dirname $$x`; \ Modified: php/php-src/branches/PHP_5_4/Makefile.gcov === --- php/php-src/branches/PHP_5_4/Makefile.gcov 2012-02-20 15:22:27 UTC (rev 323385) +++ php/php-src/branches/PHP_5_4/Makefile.gcov 2012-02-20 16:01:34 UTC (rev 323386) @@ -12,7 +12,8 @@ @rm -rf lcov_data/ @$(mkinstalldirs) lcov_data/ @echo - -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \ + -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq` ;\ + for x in $$files; do \ echo -n . ;\ y=`echo $$x | sed -e 's!\.libs/!!'`; \ dir=lcov_data/`dirname $$x`; \ Modified: php/php-src/trunk/Makefile.gcov === --- php/php-src/trunk/Makefile.gcov 2012-02-20 15:22:27 UTC (rev 323385) +++ php/php-src/trunk/Makefile.gcov 2012-02-20 16:01:34 UTC (rev 323386) @@ -14,7 +14,8 @@ @rm -rf lcov_data/ @$(mkinstalldirs) lcov_data/ @echo - -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq | while read x; do \ + -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\ + for x in $$files; do \ echo -n . ;\ y=`echo $$x | sed -e 's!\.libs/!!'`; \ dir=lcov_data/`dirname $$x`; \ -- 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/zlib/tests/bug61139.phpt branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c trunk/ext/zlib/tests/bug61139.phpt trunk/ext/zlib/zlib_fopen_wrapper.c
nikicSun, 19 Feb 2012 14:39:29 + Revision: http://svn.php.net/viewvc?view=revision&revision=323362 Log: Fix bug #61139 gzopen leaks when specifying invalid mode Needs to be merged to 5.4. Bug: https://bugs.php.net/61139 (Open) gzopen leaks when specifying invalid mode Changed paths: A php/php-src/branches/PHP_5_3/ext/zlib/tests/bug61139.phpt U php/php-src/branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c A php/php-src/trunk/ext/zlib/tests/bug61139.phpt U php/php-src/trunk/ext/zlib/zlib_fopen_wrapper.c Added: php/php-src/branches/PHP_5_3/ext/zlib/tests/bug61139.phpt === --- php/php-src/branches/PHP_5_3/ext/zlib/tests/bug61139.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/zlib/tests/bug61139.phpt 2012-02-19 14:39:29 UTC (rev 323362) @@ -0,0 +1,14 @@ +--TEST-- +Bug #61139 (gzopen leaks when specifying invalid mode) +--SKIPIF-- + +--FILE-- +gz_file = gzdopen(dup(fd), mode); + self = emalloc(sizeof(*self)); self->stream = innerstream; - if (self->gz_file) { + self->gz_file = gzdopen(dup(fd), mode); + + if (self->gz_file) { stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode); if (stream) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; return stream; } + gzclose(self->gz_file); } + + efree(self); if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "gzopen failed"); } - } else if (innerstream) { - php_stream_close(innerstream); } - } - if (stream) { - php_stream_close(stream); + php_stream_close(innerstream); } - - if (self) { - efree(self); - } - + return NULL; } Added: php/php-src/trunk/ext/zlib/tests/bug61139.phpt === --- php/php-src/trunk/ext/zlib/tests/bug61139.phpt (rev 0) +++ php/php-src/trunk/ext/zlib/tests/bug61139.phpt 2012-02-19 14:39:29 UTC (rev 323362) @@ -0,0 +1,14 @@ +--TEST-- +Bug #61139 (gzopen leaks when specifying invalid mode) +--SKIPIF-- + +--FILE-- +gz_file = gzdopen(dup(fd), mode); + self = emalloc(sizeof(*self)); self->stream = innerstream; - if (self->gz_file) { + self->gz_file = gzdopen(dup(fd), mode); + + if (self->gz_file) { stream = php_stream_alloc_rel(&php_stream_gzio_ops, self, 0, mode); if (stream) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; return stream; } + gzclose(self->gz_file); } + + efree(self); if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "gzopen failed"); } - } else if (innerstream) { - php_stream_close(innerstream); } - } - if (stream) { - php_stream_close(stream); + php_stream_close(innerstream); } - - if (self) { - efree(self); - } - + return NULL; } -- 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/xmlrpc/tests/bug61097.phpt branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c trunk/ext/xmlrpc/tests/bug61097.phpt trunk/ext/xmlrpc/xm
nikicSat, 18 Feb 2012 14:58:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=323331 Log: Fix bug #61097 Memory leak in xmlrpc functions copying zvals Needs to be merged to 5.4. Bug: https://bugs.php.net/61097 (Assigned) Memory leak in xmlrpc functions copying zvals Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61097.phpt U php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c A php/php-src/trunk/ext/xmlrpc/tests/bug61097.phpt U php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-02-18 13:39:13 UTC (rev 323330) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-18 14:58:19 UTC (rev 323331) @@ -54,6 +54,9 @@ . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). (Laruence) +- XMLRPC: + . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic) + 02 Feb 2012, PHP 5.3.10 - Core: Added: php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61097.phpt === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61097.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/tests/bug61097.phpt 2012-02-18 14:58:19 UTC (rev 323331) @@ -0,0 +1,16 @@ +--TEST-- +Bug #61097 (Memory leak in xmlrpc functions copying zvals) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Done Modified: php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2012-02-18 13:39:13 UTC (rev 323330) +++ php/php-src/branches/PHP_5_3/ext/xmlrpc/xmlrpc-epi-php.c2012-02-18 14:58:19 UTC (rev 323331) @@ -1043,9 +1043,8 @@ */ if (XMLRPC_ServerRegisterMethod(server->server_ptr, method_key, php_xmlrpc_callback)) { /* save for later use */ - MAKE_STD_ZVAL(method_name_save); - *method_name_save = **method_name; - zval_copy_ctor(method_name_save); + ALLOC_ZVAL(method_name_save); + MAKE_COPY_ZVAL(method_name, method_name_save); /* register our php method */ add_zval(server->method_map, method_key, &method_name_save); @@ -1073,9 +1072,8 @@ if (type == le_xmlrpc_server) { /* save for later use */ - MAKE_STD_ZVAL(method_name_save); - *method_name_save = **method_name; - zval_copy_ctor(method_name_save); + ALLOC_ZVAL(method_name_save); + MAKE_COPY_ZVAL(method_name, method_name_save); /* register our php method */ add_zval(server->introspection_map, NULL, &method_name_save); Added: php/php-src/trunk/ext/xmlrpc/tests/bug61097.phpt === --- php/php-src/trunk/ext/xmlrpc/tests/bug61097.phpt (rev 0) +++ php/php-src/trunk/ext/xmlrpc/tests/bug61097.phpt2012-02-18 14:58:19 UTC (rev 323331) @@ -0,0 +1,16 @@ +--TEST-- +Bug #61097 (Memory leak in xmlrpc functions copying zvals) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Done Modified: php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c === --- php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2012-02-18 13:39:13 UTC (rev 323330) +++ php/php-src/trunk/ext/xmlrpc/xmlrpc-epi-php.c 2012-02-18 14:58:19 UTC (rev 323331) @@ -1043,9 +1043,8 @@ */ if (XMLRPC_ServerRegisterMethod(server->server_ptr, method_key, php_xmlrpc_callback)) { /* save for later use */ - MAKE_STD_ZVAL(method_name_save); - *method_name_save = **method_name; - zval_copy_ctor(method_name_save); + ALLOC_ZVAL(method_name_save); + MAKE_COPY_ZVAL(method_name, method_name_save); /* register our php method */ add_zval(server->method_map, method_key, &method_name_save); @@ -1073,9 +1072,8 @@ if (type == le_xmlrpc_server) { /* save for later use */ - MAKE_STD_ZVAL(method_name_save); - *method_name_save = **method_name; - zval_copy_ctor(method_name_save); + ALLOC_ZVAL(method_name_save); + MAKE_COPY_ZVAL(method_name, method_name_save); /* register our php method */ add_zval(server->introspection_map, NULL, &method_name_save); -- PHP CVS Mailing List (http://www.php.net/) To unsubsc
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar_object.c trunk/ext/phar/phar_object.c
nikicSat, 18 Feb 2012 13:39:13 + Revision: http://svn.php.net/viewvc?view=revision&revision=323330 Log: Fix headers generated by phar sapi_header_line.line_len is the length without null terminator, so one has to take sizeof - 1. This fixes some test failures as the NUL bytes were causing warnings. Needs to be merged to 5.4. Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/phar_object.c Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c === --- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2012-02-18 13:14:30 UTC (rev 323329) +++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2012-02-18 13:39:13 UTC (rev 323330) @@ -427,7 +427,7 @@ sapi_header_line ctr = {0}; ctr.response_code = 403; - ctr.line_len = sizeof("HTTP/1.0 403 Access Denied"); + ctr.line_len = sizeof("HTTP/1.0 403 Access Denied")-1; ctr.line = "HTTP/1.0 403 Access Denied"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); sapi_send_headers(TSRMLS_C); @@ -452,7 +452,7 @@ } ctr.response_code = 404; - ctr.line_len = sizeof("HTTP/1.0 404 Not Found")+1; + ctr.line_len = sizeof("HTTP/1.0 404 Not Found")-1; ctr.line = "HTTP/1.0 404 Not Found"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); sapi_send_headers(TSRMLS_C); @@ -891,7 +891,7 @@ char *tmp = NULL, sa = '\0'; sapi_header_line ctr = {0}; ctr.response_code = 301; - ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")+1; + ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")-1; ctr.line = "HTTP/1.1 301 Moved Permanently"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); Modified: php/php-src/trunk/ext/phar/phar_object.c === --- php/php-src/trunk/ext/phar/phar_object.c2012-02-18 13:14:30 UTC (rev 323329) +++ php/php-src/trunk/ext/phar/phar_object.c2012-02-18 13:39:13 UTC (rev 323330) @@ -428,7 +428,7 @@ sapi_header_line ctr = {0}; ctr.response_code = 403; - ctr.line_len = sizeof("HTTP/1.0 403 Access Denied"); + ctr.line_len = sizeof("HTTP/1.0 403 Access Denied")-1; ctr.line = "HTTP/1.0 403 Access Denied"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); sapi_send_headers(TSRMLS_C); @@ -453,7 +453,7 @@ } ctr.response_code = 404; - ctr.line_len = sizeof("HTTP/1.0 404 Not Found")+1; + ctr.line_len = sizeof("HTTP/1.0 404 Not Found")-1; ctr.line = "HTTP/1.0 404 Not Found"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); sapi_send_headers(TSRMLS_C); @@ -893,7 +893,7 @@ char *tmp = NULL, sa = '\0'; sapi_header_line ctr = {0}; ctr.response_code = 301; - ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")+1; + ctr.line_len = sizeof("HTTP/1.1 301 Moved Permanently")-1; ctr.line = "HTTP/1.1 301 Moved Permanently"; sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); -- 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
aharvey Sat, 18 Feb 2012 04:32:45 + Revision: http://svn.php.net/viewvc?view=revision&revision=323313 Log: Merge 5.3.10 NEWS, per Ondřej's mailing list prod. 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 2012-02-18 02:18:45 UTC (rev 323312) +++ php/php-src/branches/PHP_5_3/NEWS 2012-02-18 04:32:45 UTC (rev 323313) @@ -54,9 +54,11 @@ . Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX). (Laruence) -?? ??? 2012, PHP 5.3.10 +02 Feb 2012, PHP 5.3.10 -(to be added) +- Core: + . Fixed arbitrary remote code execution vulnerability reported by Stefan +Esser, CVE-2012-0830. (Stas, Dmitry) 10 Jan 2012, PHP 5.3.9 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/tests/basic/bug61000.phpt trunk/tests/basic/bug61000.phpt
Hi: seems to be my fault,, sorry. thanks for fixing this. On Fri, Feb 17, 2012 at 1:48 AM, Rasmus Lerdorf wrote: > rasmus Thu, 16 Feb 2012 17:48:30 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323258 > > Log: > Weird, what happened here? > > Changed paths: > U php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt > U php/php-src/trunk/tests/basic/bug61000.phpt > > Modified: php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt > === > --- php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt 2012-02-16 > 16:43:04 UTC (rev 323257) > +++ php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt 2012-02-16 > 17:48:30 UTC (rev 323258) > @@ -17,22 +17,3 @@ > Array > ( > ) > ---TEST-- > -Bug #61000 (Exceeding max nesting level doesn't delete numerical vars) > ---INI-- > -max_input_nesting_level=2 > ---POST-- > -1[a][]=foo&1[a][b][c]=bar > ---GET-- > -a[a][]=foo&a[a][b][c]=bar > ---FILE-- > - -print_r($_GET); > -print_r($_POST); > ---EXPECTF-- > -Array > -( > -) > -Array > -( > -) > > Modified: php/php-src/trunk/tests/basic/bug61000.phpt > === > --- php/php-src/trunk/tests/basic/bug61000.phpt 2012-02-16 16:43:04 UTC (rev > 323257) > +++ php/php-src/trunk/tests/basic/bug61000.phpt 2012-02-16 17:48:30 UTC (rev > 323258) > @@ -17,22 +17,3 @@ > Array > ( > ) > ---TEST-- > -Bug #61000 (Exceeding max nesting level doesn't delete numerical vars) > ---INI-- > -max_input_nesting_level=2 > ---POST-- > -1[a][]=foo&1[a][b][c]=bar > ---GET-- > -a[a][]=foo&a[a][b][c]=bar > ---FILE-- > - -print_r($_GET); > -print_r($_POST); > ---EXPECTF-- > -Array > -( > -) > -Array > -( > -) > > > -- > 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/tests/basic/bug61000.phpt trunk/tests/basic/bug61000.phpt
rasmus Thu, 16 Feb 2012 17:48:30 + Revision: http://svn.php.net/viewvc?view=revision&revision=323258 Log: Weird, what happened here? Changed paths: U php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt U php/php-src/trunk/tests/basic/bug61000.phpt Modified: php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt === --- php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt 2012-02-16 16:43:04 UTC (rev 323257) +++ php/php-src/branches/PHP_5_3/tests/basic/bug61000.phpt 2012-02-16 17:48:30 UTC (rev 323258) @@ -17,22 +17,3 @@ Array ( ) ---TEST-- -Bug #61000 (Exceeding max nesting level doesn't delete numerical vars) ---INI-- -max_input_nesting_level=2 ---POST-- -1[a][]=foo&1[a][b][c]=bar ---GET-- -a[a][]=foo&a[a][b][c]=bar ---FILE-- --- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php