[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/spl/spl_directory.c trunk/ext/spl/spl_directory.c
pajoye Fri, 09 Sep 2011 07:56:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316443 Log: - improve r316420, function must return a value Changed paths: U php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c U php/php-src/trunk/ext/spl/spl_directory.c Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-09-09 07:52:16 UTC (rev 316442) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-09-09 07:56:42 UTC (rev 316443) @@ -260,7 +260,7 @@ intern-u.file.open_mode = NULL; intern-file_name = NULL; zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, Cannot use SplFileObject with directories); - return; + return FAILURE; } intern-u.file.context = php_stream_context_from_zval(intern-u.file.zcontext, 0); Modified: php/php-src/trunk/ext/spl/spl_directory.c === --- php/php-src/trunk/ext/spl/spl_directory.c 2011-09-09 07:52:16 UTC (rev 316442) +++ php/php-src/trunk/ext/spl/spl_directory.c 2011-09-09 07:56:42 UTC (rev 316443) @@ -260,7 +260,7 @@ intern-u.file.open_mode = NULL; intern-file_name = NULL; zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, Cannot use SplFileObject with directories); - return; + return FAILURE; } intern-u.file.context = php_stream_context_from_zval(intern-u.file.zcontext, 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_4/ext/spl/spl_directory.c trunk/ext/spl/spl_directory.c
pajoye Fri, 09 Sep 2011 07:57:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316444 Log: - nuke unused var Changed paths: U php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c U php/php-src/trunk/ext/spl/spl_directory.c Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-09-09 07:56:42 UTC (rev 316443) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c2011-09-09 07:57:29 UTC (rev 316444) @@ -2234,7 +2234,6 @@ char *p1, *p2; char *tmp_path; int tmp_path_len; - zval tmp; zend_error_handling error_handling; zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, error_handling TSRMLS_CC); Modified: php/php-src/trunk/ext/spl/spl_directory.c === --- php/php-src/trunk/ext/spl/spl_directory.c 2011-09-09 07:56:42 UTC (rev 316443) +++ php/php-src/trunk/ext/spl/spl_directory.c 2011-09-09 07:57:29 UTC (rev 316444) @@ -2234,7 +2234,6 @@ char *p1, *p2; char *tmp_path; int tmp_path_len; - zval tmp; zend_error_handling error_handling; zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, error_handling 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/ext/tokenizer/tests/bug26463.phpt branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation11.phpt branches/PHP_5_3/ext/tokenizer/tests/token_get_all_v
pajoye Fri, 09 Sep 2011 08:11:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316447 Log: - force LF Changed paths: _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug26463.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation11.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation12.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation13.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation14.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation15.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation17.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation18.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation19.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation4.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation5.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation6.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation7.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation8.phpt _U php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation9.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/bug26463.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation11.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation12.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation13.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation14.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation15.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation16.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation17.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation18.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation19.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation4.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation5.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation6.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation7.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation8.phpt _U php/php-src/branches/PHP_5_4/ext/tokenizer/tests/token_get_all_variation9.phpt _U php/php-src/trunk/ext/tokenizer/tests/bug26463.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation11.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation12.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation13.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation14.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation15.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation16.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation17.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation18.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation19.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation4.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation5.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation6.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation7.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation8.phpt _U php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation9.phpt Property changes on: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug26463.phpt ___ Modified: svn:eol-style - native + LF Property changes on: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation11.phpt ___ Modified: svn:eol-style - native + LF Property changes on: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation12.phpt ___ Modified: svn:eol-style - native + LF Property changes on: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation13.phpt ___ Modified:
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/curl/tests/bug48203_multi.phpt PHP_5_3/ext/curl/tests/curl_basic_008.phpt PHP_5_3/ext/curl/tests/curl_basic_010.phpt PHP_5_3/ext/curl/tests/curl_file_
bjoriFri, 09 Sep 2011 08:14:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316448 Log: Merge tests from trunk Changed paths: A php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt U php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_008.phpt U php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_010.phpt A php/php-src/branches/PHP_5_3/ext/curl/tests/curl_file_deleted_before_curl_close.phpt A php/php-src/branches/PHP_5_4/ext/curl/tests/bug48203_multi.phpt A php/php-src/branches/PHP_5_4/ext/curl/tests/curl_file_deleted_before_curl_close.phpt Added: php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug48203_multi.phpt 2011-09-09 08:14:04 UTC (rev 316448) @@ -0,0 +1,106 @@ +--TEST-- +Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec) +--SKIPIF-- +?php +if (!extension_loaded(curl)) { + exit(skip curl extension not loaded); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit(skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined); +} +? +--FILE-- +?php + +function checkForClosedFilePointer($curl_option, $description) { + $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); + + $ch1 = curl_init(); + $ch2 = curl_init(); + + $options = array( + CURLOPT_RETURNTRANSFER = 1, + $curl_option = $fp, + CURLOPT_URL = getenv(PHP_CURL_HTTP_REMOTE_SERVER) + ); + + // we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly + if (CURLOPT_STDERR == $curl_option) { + $options[CURLOPT_VERBOSE] = 1; + } + + if (CURLOPT_INFILE == $curl_option) { + $options[CURLOPT_UPLOAD] = 1; + } + + curl_setopt_array($ch1, $options); + curl_setopt_array($ch2, $options); + + fclose($fp); // -- premature close of $fp caused a crash! + + $mh = curl_multi_init(); + + curl_multi_add_handle($mh, $ch1); + curl_multi_add_handle($mh, $ch2); + + $active = 0; + do { + curl_multi_exec($mh, $active); + } while ($active 0); + + curl_multi_remove_handle($mh, $ch1); + curl_multi_remove_handle($mh, $ch2); + curl_multi_close($mh); + + echo Ok for $description\n; +} + +$options_to_check = array( + CURLOPT_STDERR, CURLOPT_WRITEHEADER, CURLOPT_FILE, CURLOPT_INFILE +); + +foreach($options_to_check as $option) { + checkForClosedFilePointer(constant($option), $option); +} + +? +--CLEAN-- +?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ? +--EXPECTF-- +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_STDERR handle is incorrect in %s on line %d + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_STDERR handle is incorrect in %s on line %d +%a +Ok for CURLOPT_STDERR + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_WRITEHEADER handle is incorrect in %s on line %d + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_WRITEHEADER handle is incorrect in %s on line %d +%AOk for CURLOPT_WRITEHEADER + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_FILE handle is incorrect in %s on line %d + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_FILE handle is incorrect in %s on line %d +%a +Ok for CURLOPT_FILE + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_INFILE handle is incorrect in %s on line %d + +Warning: curl_multi_exec(): %d is not a valid stream resource in %s on line %d + +Warning: curl_multi_exec(): CURLOPT_INFILE handle is incorrect in %s on line %d +Ok for CURLOPT_INFILE Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_008.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_008.phpt 2011-09-09 08:11:43 UTC (rev 316447) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_008.phpt 2011-09-09 08:14:04 UTC (rev 316448) @@ -3,7 +3,13 @@ --CREDITS-- TestFest 2009 - AFUP - Perrick Penet perr...@noparking.net --SKIPIF-- -?php if (!extension_loaded(curl)) print skip; ? +?php + if (!extension_loaded(curl)) print skip; + $addr = www..uniqid()...uniqid(); + if (gethostbyname($addr) != $addr) { + print skip catch all dns; + } +? --FILE-- ?php Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/curl_basic_010.phpt === ---
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c branches/PHP_5_3/ext/curl/tests/bug48203.phpt branches/PHP_5_3/ext/curl/tests/bug54798.phpt branches/PHP_5_
On Thu, Sep 8, 2011 at 21:53, Alexey Shein con...@gmail.com wrote: Hello, Hannes! It seems your fix is wrong, bug54798 still fails on my machine on trunk, 5.4 and 5.3 branches (ubuntu x64). IMO you should move your patch one line upper, i.e. before call to _php_curl_cleanup_handle(ch); since error is rasing there. Hmmh. Your right, it is failing. Maybe I screwed something up while merging between the branches. I'll check it out. There's also related bug with curl_multi part, see bug48203_multi.phpt These tests fail for me now on trunk (it seems I forgot to add some of them to other branches, please, consider trunk first): It was quite confusing why some tests were passing in 5_4, but the same test didn't on trunk. Turns out the trunk test wasn't even remotely similar to the 5_4 test yesterday :) I've merged the test cases now so it should be easier to figure out what is going on :] There are several memleaks also detected by the test suite that needs to be looked at. -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/ext/curl/tests/bug54798.phpt branches/PHP_5_4/ext/curl/tests/bug54798.phpt trunk/ext/curl/tests/bug54798.phpt
bjoriFri, 09 Sep 2011 08:28:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316449 Log: Being smart and cleanup/rename/modify tests seconds before committing isn't very smart. Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/bug54798.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/bug54798.phpt U php/php-src/trunk/ext/curl/tests/bug54798.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug54798.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug54798.phpt 2011-09-09 08:14:04 UTC (rev 316448) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug54798.phpt 2011-09-09 08:28:57 UTC (rev 316449) @@ -1,5 +1,5 @@ --TEST-- -Bug #48203 (Crash when file pointers passed to curl are closed before calling curl_exec) +Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec) --SKIPIF-- ?php if (!extension_loaded(curl)) { @@ -13,7 +13,7 @@ ?php function checkForClosedFilePointer($curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w+'); + $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); $ch = curl_init(); @@ -53,14 +53,14 @@ ? --CLEAN-- -?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ? +?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ? --EXPECTF-- -Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_2.php on line %d +Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d * About to connect() %a * Closing connection #%d Ok for CURLOPT_STDERR Ok for CURLOPT_WRITEHEADER Ok for CURLOPT_FILE -Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug48203_2.php on line %d +Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug54798.php on line %d Ok for CURLOPT_INFILE Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/bug54798.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/bug54798.phpt 2011-09-09 08:14:04 UTC (rev 316448) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug54798.phpt 2011-09-09 08:28:57 UTC (rev 316449) @@ -1,5 +1,5 @@ --TEST-- -Bug #48203 (Crash when file pointers passed to curl are closed before calling curl_exec) +Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec) --SKIPIF-- ?php if (!extension_loaded(curl)) { @@ -13,7 +13,7 @@ ?php function checkForClosedFilePointer($curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w+'); + $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); $ch = curl_init(); @@ -53,14 +53,14 @@ ? --CLEAN-- -?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ? +?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ? --EXPECTF-- -Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_2.php on line %d +Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d * About to connect() %a * Closing connection #%d Ok for CURLOPT_STDERR Ok for CURLOPT_WRITEHEADER Ok for CURLOPT_FILE -Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug48203_2.php on line %d +Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug54798.php on line %d Ok for CURLOPT_INFILE Modified: php/php-src/trunk/ext/curl/tests/bug54798.phpt === --- php/php-src/trunk/ext/curl/tests/bug54798.phpt 2011-09-09 08:14:04 UTC (rev 316448) +++ php/php-src/trunk/ext/curl/tests/bug54798.phpt 2011-09-09 08:28:57 UTC (rev 316449) @@ -1,5 +1,5 @@ --TEST-- -Bug #48203 (Crash when file pointers passed to curl are closed before calling curl_exec) +Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec) --SKIPIF-- ?php if (!extension_loaded(curl)) { @@ -13,7 +13,7 @@ ?php function checkForClosedFilePointer($curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w+'); + $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); $ch = curl_init(); @@ -53,14 +53,14 @@ ? --CLEAN-- -?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ? +?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ? --EXPECTF-- -Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_2.php on line %d +Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d * About to connect() %a * Closing connection #%d Ok for CURLOPT_STDERR Ok for CURLOPT_WRITEHEADER Ok for CURLOPT_FILE -Warning: curl_exec():
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/bug55653.phpt branches/PHP_5_4/ext/mysqli/tests/bug55653.phpt trunk/ext/mysqli/tests/bug55653.phpt
uw Fri, 09 Sep 2011 12:12:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316455 Log: Bug #55653 Bug: https://bugs.php.net/55653 (Open) PS crash with libmysql when binding same variable as param and out Changed paths: A php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug55653.phpt A php/php-src/branches/PHP_5_4/ext/mysqli/tests/bug55653.phpt A php/php-src/trunk/ext/mysqli/tests/bug55653.phpt Added: php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug55653.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug55653.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug55653.phpt 2011-09-09 12:12:08 UTC (rev 316455) @@ -0,0 +1,36 @@ +--TEST-- +Bug #55653 PS crash with libmysql when binding same variable as param and out +--SKIPIF-- +?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +? +--FILE-- +?php + require_once(connect.inc); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf([001] Connect failed, [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + } + + $in_and_out = a; + + if (!($stmt = $link-stmt_init())) + printf([002] [%d] %s\n, $link-errno, $link-error); + + if (!($stmt-prepare(SELECT ?)) || + !($stmt-bind_param(s, $in_and_out)) || + !($stmt-execute()) || + !($stmt-bind_result($in_and_out))) + printf([003] [%d] %s\n, $stmt-errno, $stmt-error); + + if (!$stmt-fetch()) + printf([004] [%d] %s\n, $stmt-errno, $stmt-error); + + if (a !== $in_and_out) + printf([005] Wrong result: '%s'\n, $in_and_out); + + echo done!; +? +--EXPECT-- +done! \ No newline at end of file Added: php/php-src/branches/PHP_5_4/ext/mysqli/tests/bug55653.phpt === --- php/php-src/branches/PHP_5_4/ext/mysqli/tests/bug55653.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/bug55653.phpt 2011-09-09 12:12:08 UTC (rev 316455) @@ -0,0 +1,36 @@ +--TEST-- +Bug #55653 PS crash with libmysql when binding same variable as param and out +--SKIPIF-- +?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +? +--FILE-- +?php + require_once(connect.inc); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf([001] Connect failed, [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + } + + $in_and_out = a; + + if (!($stmt = $link-stmt_init())) + printf([002] [%d] %s\n, $link-errno, $link-error); + + if (!($stmt-prepare(SELECT ?)) || + !($stmt-bind_param(s, $in_and_out)) || + !($stmt-execute()) || + !($stmt-bind_result($in_and_out))) + printf([003] [%d] %s\n, $stmt-errno, $stmt-error); + + if (!$stmt-fetch()) + printf([004] [%d] %s\n, $stmt-errno, $stmt-error); + + if (a !== $in_and_out) + printf([005] Wrong result: '%s'\n, $in_and_out); + + echo done!; +? +--EXPECT-- +done! \ No newline at end of file Added: php/php-src/trunk/ext/mysqli/tests/bug55653.phpt === --- php/php-src/trunk/ext/mysqli/tests/bug55653.phpt (rev 0) +++ php/php-src/trunk/ext/mysqli/tests/bug55653.phpt2011-09-09 12:12:08 UTC (rev 316455) @@ -0,0 +1,36 @@ +--TEST-- +Bug #55653 PS crash with libmysql when binding same variable as param and out +--SKIPIF-- +?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +? +--FILE-- +?php + require_once(connect.inc); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf([001] Connect failed, [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + } + + $in_and_out = a; + + if (!($stmt = $link-stmt_init())) + printf([002] [%d] %s\n, $link-errno, $link-error); + + if (!($stmt-prepare(SELECT ?)) || + !($stmt-bind_param(s, $in_and_out)) || + !($stmt-execute()) || + !($stmt-bind_result($in_and_out))) + printf([003] [%d] %s\n, $stmt-errno, $stmt-error); + + if (!$stmt-fetch()) + printf([004] [%d] %s\n, $stmt-errno, $stmt-error); + + if (a !== $in_and_out) + printf([005] Wrong result: '%s'\n, $in_and_out); + + echo done!; +? +--EXPECT-- +done! \ No newline at end of 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_4/ext/mysqli/mysqli_api.c trunk/ext/mysqli/mysqli_api.c
laruence Sat, 10 Sep 2011 03:51:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316474 Log: Fixed Bug #55653(PS crash with libmysql when binding same variable as param and out) Actually this caused by attempt to efree a INTERNED string Bug: https://bugs.php.net/55653 (Open) PS crash with libmysql when binding same variable as param and out Changed paths: U php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c U php/php-src/trunk/ext/mysqli/mysqli_api.c Modified: php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c2011-09-10 01:28:12 UTC (rev 316473) +++ php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c2011-09-10 03:51:16 UTC (rev 316474) @@ -887,7 +887,7 @@ */ /* Even if the string is of length zero there is one byte alloced so efree() in all cases */ if (Z_TYPE_P(stmt-result.vars[i]) == IS_STRING) { - efree(stmt-result.vars[i]-value.str.val); + STR_FREE(stmt-result.vars[i]-value.str.val); } if (!stmt-result.is_null[i]) { switch (stmt-result.buf[i].type) { Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c === --- php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-09-10 01:28:12 UTC (rev 316473) +++ php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-09-10 03:51:16 UTC (rev 316474) @@ -887,7 +887,7 @@ */ /* Even if the string is of length zero there is one byte alloced so efree() in all cases */ if (Z_TYPE_P(stmt-result.vars[i]) == IS_STRING) { - efree(stmt-result.vars[i]-value.str.val); + STR_FREE(stmt-result.vars[i]-value.str.val); } if (!stmt-result.is_null[i]) { switch (stmt-result.buf[i].type) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/mysqli/mysqli_api.c trunk/ext/mysqli/mysqli_api.c
Laruence, Is this covered by an existing test? If not, can you add one? Chris On 09/09/2011 08:51 PM, Xinchen Hui wrote: laruence Sat, 10 Sep 2011 03:51:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316474 Log: Fixed Bug #55653(PS crash with libmysql when binding same variable as param and out) Actually this caused by attempt to efree a INTERNED string Bug: https://bugs.php.net/55653 (Open) PS crash with libmysql when binding same variable as param and out Changed paths: U php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c U php/php-src/trunk/ext/mysqli/mysqli_api.c Modified: php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c2011-09-10 01:28:12 UTC (rev 316473) +++ php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_api.c2011-09-10 03:51:16 UTC (rev 316474) @@ -887,7 +887,7 @@ */ /* Even if the string is of length zero there is one byte alloced so efree() in all cases */ if (Z_TYPE_P(stmt-result.vars[i]) == IS_STRING) { - efree(stmt-result.vars[i]-value.str.val); + STR_FREE(stmt-result.vars[i]-value.str.val); } if (!stmt-result.is_null[i]) { switch (stmt-result.buf[i].type) { Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c === --- php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-09-10 01:28:12 UTC (rev 316473) +++ php/php-src/trunk/ext/mysqli/mysqli_api.c 2011-09-10 03:51:16 UTC (rev 316474) @@ -887,7 +887,7 @@ */ /* Even if the string is of length zero there is one byte alloced so efree() in all cases */ if (Z_TYPE_P(stmt-result.vars[i]) == IS_STRING) { - efree(stmt-result.vars[i]-value.str.val); + STR_FREE(stmt-result.vars[i]-value.str.val); } if (!stmt-result.is_null[i]) { switch (stmt-result.buf[i].type) { -- 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_4/ext/mysqli/mysqli_api.c trunk/ext/mysqli/mysqli_api.c
Hi: uw has already added tests for this http://svn.php.net/viewvc/?view=revisionamp;revision=316455 thanks -- 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_4/ext/session/tests/rfc1867_invalid_settings.phpt branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt trunk/ext/session/tests/rfc1867_invalid
stas Sat, 10 Sep 2011 05:29:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316475 Log: revert bad test change Changed paths: U php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt U php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt U php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt U php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt Modified: php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt === --- php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt 2011-09-10 03:51:16 UTC (rev 316474) +++ php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt 2011-09-10 05:29:29 UTC (rev 316475) @@ -9,7 +9,5 @@ var_dump(ini_get(session.upload_progress.freq)); ? --EXPECTF-- -PHP Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s - Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s string(%d) 1% Modified: php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt === --- php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt 2011-09-10 03:51:16 UTC (rev 316474) +++ php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt 2011-09-10 05:29:29 UTC (rev 316475) @@ -9,7 +9,5 @@ var_dump(ini_get(session.upload_progress.freq)); ? --EXPECTF-- -PHP Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s - Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s string(%d) 1% Modified: php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt === --- php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt 2011-09-10 03:51:16 UTC (rev 316474) +++ php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt 2011-09-10 05:29:29 UTC (rev 316475) @@ -9,7 +9,5 @@ var_dump(ini_get(session.upload_progress.freq)); ? --EXPECTF-- -PHP Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s - Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s string(%d) 1% Modified: php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt === --- php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt 2011-09-10 03:51:16 UTC (rev 316474) +++ php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt 2011-09-10 05:29:29 UTC (rev 316475) @@ -9,7 +9,5 @@ var_dump(ini_get(session.upload_progress.freq)); ? --EXPECTF-- -PHP Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s - Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s string(%d) 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_4/ext/phar/tests/fatal_error_webphar.phpt trunk/ext/phar/tests/fatal_error_webphar.phpt
stas Sat, 10 Sep 2011 05:36:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=316476 Log: Fix error message Changed paths: U php/php-src/branches/PHP_5_4/ext/phar/tests/fatal_error_webphar.phpt U php/php-src/trunk/ext/phar/tests/fatal_error_webphar.phpt Modified: php/php-src/branches/PHP_5_4/ext/phar/tests/fatal_error_webphar.phpt === --- php/php-src/branches/PHP_5_4/ext/phar/tests/fatal_error_webphar.phpt 2011-09-10 05:29:29 UTC (rev 316475) +++ php/php-src/branches/PHP_5_4/ext/phar/tests/fatal_error_webphar.phpt 2011-09-10 05:36:14 UTC (rev 316476) @@ -15,4 +15,4 @@ --EXPECTF-- string(9) \Web\View -Parse error: syntax error, unexpected echo (T_ECHO), expecting function (T_FUNCTION) in phar:///%sfatal_error_webphar.php/Web/View.php on line 380 +Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting function (T_FUNCTION) in phar:///%sfatal_error_webphar.php/Web/View.php on line 380 Modified: php/php-src/trunk/ext/phar/tests/fatal_error_webphar.phpt === --- php/php-src/trunk/ext/phar/tests/fatal_error_webphar.phpt 2011-09-10 05:29:29 UTC (rev 316475) +++ php/php-src/trunk/ext/phar/tests/fatal_error_webphar.phpt 2011-09-10 05:36:14 UTC (rev 316476) @@ -15,4 +15,4 @@ --EXPECTF-- string(9) \Web\View -Parse error: syntax error, unexpected echo (T_ECHO), expecting function (T_FUNCTION) in phar:///%sfatal_error_webphar.php/Web/View.php on line 380 +Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting function (T_FUNCTION) in phar:///%sfatal_error_webphar.php/Web/View.php on line 380 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php