[PHP-CVS] cvs: phpruntests /code-samples/taskScheduler run.php /code-samples/taskScheduler/classes taskScheduler.php /code-samples/taskScheduler/example4 main.php taskFileWriter.php
g2 Tue Jun 16 22:43:30 2009 UTC Added files: /phpruntests/code-samples/taskScheduler/example4taskFileWriter.php main.php Modified files: /phpruntests/code-samples/taskScheduler/classes taskScheduler.php /phpruntests/code-samples/taskScheduler run.php Log: phpruntests - update taskScheduler-prototype http://cvs.php.net/viewvc.cgi/phpruntests/code-samples/taskScheduler/classes/taskScheduler.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/code-samples/taskScheduler/classes/taskScheduler.php diff -u phpruntests/code-samples/taskScheduler/classes/taskScheduler.php:1.1 phpruntests/code-samples/taskScheduler/classes/taskScheduler.php:1.2 --- phpruntests/code-samples/taskScheduler/classes/taskScheduler.php:1.1 Sat Jun 13 03:13:30 2009 +++ phpruntests/code-samples/taskScheduler/classes/taskScheduler.phpTue Jun 16 22:43:30 2009 @@ -9,14 +9,15 @@ const MSG_QUEUE_SIZE = 1024;// max-size of a single message const KILL_CHILD = 'killBill'; // kill-signal to terminate a child - private $taskList = array(); - private $processCount = NULL; - private $inputQueue = NULL; - private $pidStore = array(); - private $time = 0; - private $countPass = 0; - private $countFail = 0; - private $groupTasks = false; + private $taskList = array();// the list of the tasks to be executed + private $processCount = NULL; // the number of processes + private $inputQueue = NULL; // the input-queue (only used by the sender) + private $pidStore = array();// stores the pids of all child-processes + private $time = 0; // the needed time + private $countPass = 0; // counts the passed tasks + private $countFail = 0; // counts the failed tasks + private $groupTasks = false;// are the tasks stored in groups? + private $memStore = array();// stores the mem-usage after an incomming task /** @@ -252,6 +253,8 @@ } for ($i=0; $i<$limit; $i++) { + + $this->memStore[] = memory_get_usage(true); if (msg_receive($resultQueue, 0, $type, self::MSG_QUEUE_SIZE, $task, true, NULL, $error)) { @@ -273,6 +276,8 @@ $this->taskList[$index] = $task; logg("RECEIVER store task $index"); } + + } else logg("RECEIVER ERROR $error"); } @@ -352,7 +357,7 @@ /** * the child is listening to the input-queue and executes the incomming * tasks. afterwards it setts the task-state and sends it back to the -* receiver by the result-queue. +* receiver via the result-queue. * after receiving the kill-signal from the receiver it terminates itself. * * @param int $cidthe child-id (default=NULL) @@ -426,6 +431,7 @@ print "Tasks:\t\t".$count."\n"; } else { + $count = sizeof($this->taskList); print "Tasks:\t\t".$count."\n"; } @@ -437,8 +443,12 @@ if ($this->processCount > 0) { print "AVG sec/task:\t".round($this->time/$this->processCount,5)."\n"; + print "Memory-MAX:\t".number_format(max($this->memStore))."\n"; + print "Memory-MIN:\t".number_format(min($this->memStore))."\n"; + $avg = array_sum($this->memStore)/sizeof($this->memStore); + print "Memory-AVG:\t".number_format($avg)."\n"; } - + print "\n"; flush(); } @@ -470,6 +480,30 @@ } } + + + public function printMemStatistic($int=10) + { + print "MEMORY-USAGE"; + print "\n\n"; + + $int = ceil(sizeof($this->memStore)/$int); + + $title = "TASK:\t"; + $body = "kB:\t"; + + for ($i=0; $imemStore); $i+=$int) { + + $title .= "$i\t"; + $body .= round($this->memStore[$i]/1000)."\t"; + } + + print $title."\n".$body; + + print "\n\n"; +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/misc time_nanosleep_error3.phpt time_nanosleep_error4.phpt
felipe Tue Jun 16 19:50:38 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/misctime_nanosleep_error3.phpt time_nanosleep_error4.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.4.2 php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.4.3 --- php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.4.2 Sat May 16 14:41:48 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt Tue Jun 16 19:50:38 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.4.2 php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.4.3 --- php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.4.2 Sat May 16 14:41:48 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt Tue Jun 16 19:50:38 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/misc time_nanosleep_error3.phpt time_nanosleep_error4.phpt
felipe Tue Jun 16 19:49:55 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/misctime_nanosleep_error3.phpt time_nanosleep_error4.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.2.2 php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.2.3 --- php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1.2.2 Sat May 16 14:41:27 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt Tue Jun 16 19:49:55 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.2.2 php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.2.3 --- php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1.2.2 Sat May 16 14:41:27 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt Tue Jun 16 19:49:55 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/misc time_nanosleep_error3.phpt time_nanosleep_error4.phpt
felipe Tue Jun 16 19:49:04 2009 UTC Modified files: /php-src/ext/standard/tests/misctime_nanosleep_error3.phpt time_nanosleep_error4.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1 php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.2 --- php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt:1.1 Sat May 16 14:41:03 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt Tue Jun 16 19:49:04 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt diff -u php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1 php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.2 --- php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.1 Sat May 16 14:41:03 2009 +++ php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt Tue Jun 16 19:49:04 2009 @@ -1,7 +1,10 @@ --TEST-- time_nanosleep â Delay for a number of seconds and nanoseconds --SKIPIF-- - + --CREDITS-- Ãlex Corretgé - a...@corretge.cat --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strcoll_error.phpt
wharmby Tue Jun 16 19:39:40 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings strcoll_error.phpt Log: New strcoll error test. Tested on Windows, Linux and Linux 64. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strcoll_error.phpt +++ php-src/ext/standard/tests/strings/strcoll_error.phpt --TEST-- Test strcoll() function : error conditions --FILE-- ===Done=== --EXPECTF-- *** Testing strcoll() : error conditions *** -- Testing strcoll() function with no arguments -- Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d NULL Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with one argument -- Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with more than expected no. of arguments -- Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d NULL ===Done=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strcoll_error.phpt
wharmby Tue Jun 16 19:39:39 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strcoll_error.phpt Log: New strcoll error test. Tested on Windows, Linux and Linux 64. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strcoll_error.phpt +++ php-src/ext/standard/tests/strings/strcoll_error.phpt --TEST-- Test strcoll() function : error conditions --FILE-- ===Done=== --EXPECTF-- *** Testing strcoll() : error conditions *** -- Testing strcoll() function with no arguments -- Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d NULL Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with one argument -- Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with more than expected no. of arguments -- Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d NULL ===Done=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings strcoll_error.phpt
wharmby Tue Jun 16 19:39:37 2009 UTC Added files: /php-src/ext/standard/tests/strings strcoll_error.phpt Log: New strcoll error test. Tested on Windows, Linux and Linux 64. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strcoll_error.phpt +++ php-src/ext/standard/tests/strings/strcoll_error.phpt --TEST-- Test strcoll() function : error conditions --FILE-- ===Done=== --EXPECTF-- *** Testing strcoll() : error conditions *** -- Testing strcoll() function with no arguments -- Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d NULL Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with one argument -- Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d NULL -- Testing strcoll() function with more than expected no. of arguments -- Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d NULL ===Done=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_ps.c
andrey Tue Jun 16 18:00:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd_ps.c Log: MFH: C-comments http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.3.2.28&r2=1.3.2.29&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_ps.c diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.28 php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.29 --- php-src/ext/mysqlnd/mysqlnd_ps.c:1.3.2.28 Tue Jun 16 09:15:38 2009 +++ php-src/ext/mysqlnd/mysqlnd_ps.cTue Jun 16 18:00:00 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_ps.c,v 1.3.2.28 2009/06/16 09:15:38 andrey Exp $ */ +/* $Id: mysqlnd_ps.c,v 1.3.2.29 2009/06/16 18:00:00 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -871,7 +871,7 @@ result->meta->fields[i].max_length = Z_STRLEN_P(data); } stmt->result_bind[i].zv->value = data->value; - // copied data, thus also the ownership. Thus null data + /* copied data, thus also the ownership. Thus null data */ ZVAL_NULL(data); } } @@ -1047,7 +1047,7 @@ result->meta->fields[i].max_length = Z_STRLEN_P(data); } stmt->result_bind[i].zv->value = data->value; - // copied data, thus also the ownership. Thus null data + /* copied data, thus also the ownership. Thus null data */ ZVAL_NULL(data); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_ps.c
andrey Tue Jun 16 17:59:19 2009 UTC Modified files: /php-src/ext/mysqlndmysqlnd_ps.c Log: C-comments should be used http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.31&r2=1.32&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_ps.c diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.31 php-src/ext/mysqlnd/mysqlnd_ps.c:1.32 --- php-src/ext/mysqlnd/mysqlnd_ps.c:1.31 Tue Jun 16 09:15:09 2009 +++ php-src/ext/mysqlnd/mysqlnd_ps.cTue Jun 16 17:59:19 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_ps.c,v 1.31 2009/06/16 09:15:09 andrey Exp $ */ +/* $Id: mysqlnd_ps.c,v 1.32 2009/06/16 17:59:19 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -871,7 +871,7 @@ result->meta->fields[i].max_length = Z_STRLEN_P(data); } stmt->result_bind[i].zv->value = data->value; - // copied data, thus also the ownership. Thus null data + /* copied data, thus also the ownership. Thus null data */ ZVAL_NULL(data); } } @@ -1047,7 +1047,7 @@ result->meta->fields[i].max_length = Z_STRLEN_P(data); } stmt->result_bind[i].zv->value = data->value; - // copied data, thus also the ownership. Thus null data + /* copied data, thus also the ownership. Thus null data */ ZVAL_NULL(data); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard link_win32.c
pajoye Tue Jun 16 16:53:56 2009 UTC Modified files: /php-src/ext/standard link_win32.c Log: - MF53: fix readlink in TS SAPI http://cvs.php.net/viewvc.cgi/php-src/ext/standard/link_win32.c?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/standard/link_win32.c diff -u php-src/ext/standard/link_win32.c:1.5 php-src/ext/standard/link_win32.c:1.6 --- php-src/ext/standard/link_win32.c:1.5 Wed Jun 3 08:07:29 2009 +++ php-src/ext/standard/link_win32.c Tue Jun 16 16:53:56 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: link_win32.c,v 1.5 2009/06/03 08:07:29 pajoye Exp $ */ +/* $Id: link_win32.c,v 1.6 2009/06/16 16:53:56 pajoye Exp $ */ #ifdef PHP_WIN32 #include "php.h" @@ -62,6 +62,7 @@ char *link; int link_len; TCHAR Path[MAXPATHLEN]; + char path_resolved[MAXPATHLEN]; HANDLE hFile; DWORD dwRet; @@ -88,14 +89,17 @@ if (OPENBASEDIR_CHECKPATH(link)) { RETURN_FALSE; } - - hFile = CreateFile(link, // file to open - GENERIC_READ, // open for reading - FILE_SHARE_READ, // share for reading - NULL, // default security - OPEN_EXISTING, // existing file only - FILE_FLAG_BACKUP_SEMANTICS, // normal file - NULL); // no attr. template + if (!expand_filepath(link, path_resolved TSRMLS_CC)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No such file or directory"); + RETURN_FALSE; + } + hFile = CreateFile(path_resolved, // file to open +GENERIC_READ, // open for reading +FILE_SHARE_READ, // share for reading +NULL, // default security +OPEN_EXISTING, // existing file only +FILE_FLAG_BACKUP_SEMANTICS, // normal file +NULL); // no attr. template if( hFile == INVALID_HANDLE_VALUE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not open file (error %d)", GetLastError()); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard link_win32.c
pajoye Tue Jun 16 16:50:13 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard link_win32.c Log: - fix readlink in TS SAPI http://cvs.php.net/viewvc.cgi/php-src/ext/standard/link_win32.c?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/standard/link_win32.c diff -u php-src/ext/standard/link_win32.c:1.1.2.4 php-src/ext/standard/link_win32.c:1.1.2.5 --- php-src/ext/standard/link_win32.c:1.1.2.4 Wed Jun 3 07:56:53 2009 +++ php-src/ext/standard/link_win32.c Tue Jun 16 16:50:13 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: link_win32.c,v 1.1.2.4 2009/06/03 07:56:53 pajoye Exp $ */ +/* $Id: link_win32.c,v 1.1.2.5 2009/06/16 16:50:13 pajoye Exp $ */ #ifdef PHP_WIN32 #include "php.h" @@ -63,6 +63,7 @@ char *link; int link_len; TCHAR Path[MAXPATHLEN]; + char path_resolved[MAXPATHLEN]; HANDLE hFile; DWORD dwRet; @@ -89,14 +90,17 @@ if (OPENBASEDIR_CHECKPATH(link)) { RETURN_FALSE; } - - hFile = CreateFile(link, // file to open - GENERIC_READ, // open for reading - FILE_SHARE_READ, // share for reading - NULL, // default security - OPEN_EXISTING, // existing file only - FILE_FLAG_BACKUP_SEMANTICS, // normal file - NULL); // no attr. template + if (!expand_filepath(link, path_resolved TSRMLS_CC)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No such file or directory"); + RETURN_FALSE; + } + hFile = CreateFile(path_resolved, // file to open +GENERIC_READ, // open for reading +FILE_SHARE_READ, // share for reading +NULL, // default security +OPEN_EXISTING, // existing file only +FILE_FLAG_BACKUP_SEMANTICS, // normal file +NULL); // no attr. template if( hFile == INVALID_HANDLE_VALUE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not open file (error %d)", GetLastError()); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection php_reflection.c ZendEngine2 zend_stream.h
felipe Tue Jun 16 14:33:33 2009 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2zend_stream.h /php-src/ext/reflection php_reflection.c Log: - MFH: Fixed build (removed trailing comma) patch by Seiji Masugata http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_stream.h?r1=1.8.2.1.2.1.2.5&r2=1.8.2.1.2.1.2.6&diff_format=u Index: ZendEngine2/zend_stream.h diff -u ZendEngine2/zend_stream.h:1.8.2.1.2.1.2.5 ZendEngine2/zend_stream.h:1.8.2.1.2.1.2.6 --- ZendEngine2/zend_stream.h:1.8.2.1.2.1.2.5 Wed Mar 11 22:11:53 2009 +++ ZendEngine2/zend_stream.h Tue Jun 16 14:33:33 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: zend_stream.h,v 1.8.2.1.2.1.2.5 2009/03/11 22:11:53 shire Exp $ */ +/* $Id: zend_stream.h,v 1.8.2.1.2.1.2.6 2009/06/16 14:33:33 felipe Exp $ */ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H @@ -38,7 +38,7 @@ ZEND_HANDLE_FD, ZEND_HANDLE_FP, ZEND_HANDLE_STREAM, - ZEND_HANDLE_MAPPED, + ZEND_HANDLE_MAPPED } zend_stream_type; typedef struct _zend_mmap { http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.57&r2=1.164.2.33.2.45.2.58&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.57 php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.58 --- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.57Thu May 21 16:01:37 2009 +++ php-src/ext/reflection/php_reflection.c Tue Jun 16 14:33:33 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.57 2009/05/21 16:01:37 lbarnaud Exp $ */ +/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.58 2009/06/16 14:33:33 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -191,7 +191,7 @@ REF_TYPE_OTHER, /* Must be 0 */ REF_TYPE_FUNCTION, REF_TYPE_PARAMETER, - REF_TYPE_PROPERTY, + REF_TYPE_PROPERTY } reflection_type_t; /* Struct for reflection objects */ @@ -5442,7 +5442,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.57 $"); + php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.58 $"); php_info_print_table_end(); } /* }}} */ @@ -5456,7 +5456,7 @@ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 1.164.2.33.2.45.2.57 $", + "$Revision: 1.164.2.33.2.45.2.58 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c ZendEngine2 zend_stream.h
felipe Tue Jun 16 14:29:19 2009 UTC Modified files: /ZendEngine2zend_stream.h /php-src/ext/reflection php_reflection.c Log: - Fixed build (removed trailing comma) patch by Seiji Masugata http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_stream.h?r1=1.16&r2=1.17&diff_format=u Index: ZendEngine2/zend_stream.h diff -u ZendEngine2/zend_stream.h:1.16 ZendEngine2/zend_stream.h:1.17 --- ZendEngine2/zend_stream.h:1.16 Wed Mar 11 22:11:41 2009 +++ ZendEngine2/zend_stream.h Tue Jun 16 14:29:18 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: zend_stream.h,v 1.16 2009/03/11 22:11:41 shire Exp $ */ +/* $Id: zend_stream.h,v 1.17 2009/06/16 14:29:18 felipe Exp $ */ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H @@ -36,7 +36,7 @@ ZEND_HANDLE_FD, ZEND_HANDLE_FP, ZEND_HANDLE_STREAM, - ZEND_HANDLE_MAPPED, + ZEND_HANDLE_MAPPED } zend_stream_type; typedef struct _zend_mmap { http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.345&r2=1.346&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.345 php-src/ext/reflection/php_reflection.c:1.346 --- php-src/ext/reflection/php_reflection.c:1.345 Mon May 25 14:32:14 2009 +++ php-src/ext/reflection/php_reflection.c Tue Jun 16 14:29:18 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.345 2009/05/25 14:32:14 felipe Exp $ */ +/* $Id: php_reflection.c,v 1.346 2009/06/16 14:29:18 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -186,7 +186,7 @@ REF_TYPE_OTHER, /* Must be 0 */ REF_TYPE_FUNCTION, REF_TYPE_PARAMETER, - REF_TYPE_PROPERTY, + REF_TYPE_PROPERTY } reflection_type_t; /* Struct for reflection objects */ @@ -5687,7 +5687,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 1.345 $"); + php_info_print_table_row(2, "Version", "$Revision: 1.346 $"); php_info_print_table_end(); } /* }}} */ @@ -5701,7 +5701,7 @@ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 1.345 $", + "$Revision: 1.346 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_debug.c mysqlnd_result.c
andrey Tue Jun 16 13:07:14 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd_debug.c mysqlnd_result.c Log: MFH: Memory usage optimisation. mysqlnd is not libmysql. mysqlnd does use the Zend allocator, which means that is easier to hit memory_limit if you have big stored (buffered) result sets. Before with libmysql you won't hit memory_limit because libmysql uses libc's allocator and nothing is checked. Now, with mysqlnd the situation is stricter and it is easier to hit memory_limit. We try to optimize for big result sets. If a result set is larger than 10 rows we will start freeing some data to keep memory usage after 10 rows constant. This will help in the cases where a buffered result set is scrolled forward only and just only once, or mysqlnd will need to decode data from the network buffers again - yes, it is a trade-off between CPU time and memory size. The best for big result sets is of course using unbuffered queries - for comparison : 3 Million rows with buffered take at least 180MB, with buffered you will stay at 3MB, and unbuffered will be just 7-8% slower. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.1.2.16&r2=1.1.2.17&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_debug.c diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.16 php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.17 --- php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.16Thu May 28 11:47:48 2009 +++ php-src/ext/mysqlnd/mysqlnd_debug.c Tue Jun 16 13:07:14 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_debug.c,v 1.1.2.16 2009/05/28 11:47:48 andrey Exp $ */ +/* $Id: mysqlnd_debug.c,v 1.1.2.17 2009/06/16 13:07:14 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" @@ -830,6 +830,9 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) { DBG_ENTER(mysqlnd_efree_name); + if (!ptr) { + DBG_VOID_RETURN; + } #ifdef MYSQLND_THREADED if (MYSQLND_G(thread_id) != tsrm_thread_id()) { DBG_RETURN(_mysqlnd_pefree(ptr, 1 TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)); http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.30&r2=1.4.2.31&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result.c diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.30 php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.31 --- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.30 Tue Jun 16 09:15:38 2009 +++ php-src/ext/mysqlnd/mysqlnd_result.cTue Jun 16 13:07:14 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_result.c,v 1.4.2.30 2009/06/16 09:15:38 andrey Exp $ */ +/* $Id: mysqlnd_result.c,v 1.4.2.31 2009/06/16 13:07:14 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -30,6 +30,9 @@ #include "mysqlnd_debug.h" #include "ext/standard/basic_functions.h" +#define START_FREEING_AFTER_X_ROWS 10 +static void mysqlnd_buffered_free_previous_row(MYSQLND_RES *result, int which TSRMLS_DC); + #define MYSQLND_SILENT #ifdef MYSQLND_THREADED @@ -101,11 +104,18 @@ unsigned int field_count = result->meta->field_count; unsigned int row_count = result->stored_data->row_count; DBG_ENTER("mysqlnd_res_initialize_result_set_rest"); + DBG_INF_FMT("before heap=%lu real=%lu", zend_memory_usage(FALSE TSRMLS_CC), zend_memory_usage(TRUE TSRMLS_CC)); if (!data_cursor || row_count == result->stored_data->initialized_rows) { DBG_VOID_RETURN; } while ((data_cursor - data_begin) < (row_count * field_count)) { + if (START_FREEING_AFTER_X_ROWS < ((data_cursor - data_begin) / result->field_count)) { + zval **orig_data_cursor = result->stored_data->data_cursor; + result->stored_data->data_cursor = data_cursor; + mysqlnd_buffered_free_previous_row(result, START_FREEING_AFTER_X_ROWS TSRMLS_CC); + result->stored_data->data_cursor = orig_data_cursor; + } if (NULL == data_cursor[0]) { result->stored_data->initialized_rows++; result->m.row_decoder( @@ -130,6 +140,7 @@ } data_cursor += field_count; } + DBG_INF_FMT("after heap=%lu real=%lu", zend_memory_usage(FALSE TSRMLS_CC), zend_memory_usage(TRUE TSRMLS_CC)); DBG_VOID_RETURN; } /* }}} */ @@ -186,6 +197,53 @@ /* }}} */ +/* {{{ mysqlnd_buffered_free_previous_row */ +static +void mysqlnd_buffered_free_previous_row(MYSQLND_RES *result, int which TSRMLS_DC) +{ + MYSQLND_RES_BUFFERED * set = result->stored_data; + + DBG_ENTER("mysqlnd_buffered_free_previous_row"); + + if (!set) { + DBG_VOID_RETURN; + } + + DBG_INF_F
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_debug.c mysqlnd_result.c
andrey Tue Jun 16 13:06:45 2009 UTC Modified files: /php-src/ext/mysqlndmysqlnd_debug.c mysqlnd_result.c Log: Memory usage optimisation. mysqlnd is not libmysql. mysqlnd does use the Zend allocator, which means that is easier to hit memory_limit if you have big stored (buffered) result sets. Before with libmysql you won't hit memory_limit because libmysql uses libc's allocator and nothing is checked. Now, with mysqlnd the situation is stricter and it is easier to hit memory_limit. We try to optimize for big result sets. If a result set is larger than 10 rows we will start freeing some data to keep memory usage after 10 rows constant. This will help in the cases where a buffered result set is scrolled forward only and just only once, or mysqlnd will need to decode data from the network buffers again - yes, it is a trade-off between CPU time and memory size. The best for big result sets is of course using unbuffered queries - for comparison : 3 Million rows with buffered take at least 180MB, with buffered you will stay at 3MB, and unbuffered will be just 7-8% slower. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.15&r2=1.16&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_debug.c diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.15 php-src/ext/mysqlnd/mysqlnd_debug.c:1.16 --- php-src/ext/mysqlnd/mysqlnd_debug.c:1.15Thu May 28 11:47:15 2009 +++ php-src/ext/mysqlnd/mysqlnd_debug.c Tue Jun 16 13:06:45 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_debug.c,v 1.15 2009/05/28 11:47:15 andrey Exp $ */ +/* $Id: mysqlnd_debug.c,v 1.16 2009/06/16 13:06:45 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" @@ -830,6 +830,9 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) { DBG_ENTER(mysqlnd_efree_name); + if (!ptr) { + DBG_VOID_RETURN; + } #ifdef MYSQLND_THREADED if (MYSQLND_G(thread_id) != tsrm_thread_id()) { DBG_RETURN(_mysqlnd_pefree(ptr, 1 TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)); http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.34&r2=1.35&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result.c diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.34 php-src/ext/mysqlnd/mysqlnd_result.c:1.35 --- php-src/ext/mysqlnd/mysqlnd_result.c:1.34 Tue Jun 16 09:15:09 2009 +++ php-src/ext/mysqlnd/mysqlnd_result.cTue Jun 16 13:06:45 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_result.c,v 1.34 2009/06/16 09:15:09 andrey Exp $ */ +/* $Id: mysqlnd_result.c,v 1.35 2009/06/16 13:06:45 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -30,6 +30,9 @@ #include "mysqlnd_debug.h" #include "ext/standard/basic_functions.h" +#define START_FREEING_AFTER_X_ROWS 10 +static void mysqlnd_buffered_free_previous_row(MYSQLND_RES *result, int which TSRMLS_DC); + #define MYSQLND_SILENT #ifdef MYSQLND_THREADED @@ -101,11 +104,18 @@ unsigned int field_count = result->meta->field_count; unsigned int row_count = result->stored_data->row_count; DBG_ENTER("mysqlnd_res_initialize_result_set_rest"); + DBG_INF_FMT("before heap=%lu real=%lu", zend_memory_usage(FALSE TSRMLS_CC), zend_memory_usage(TRUE TSRMLS_CC)); if (!data_cursor || row_count == result->stored_data->initialized_rows) { DBG_VOID_RETURN; } while ((data_cursor - data_begin) < (row_count * field_count)) { + if (START_FREEING_AFTER_X_ROWS < ((data_cursor - data_begin) / result->field_count)) { + zval **orig_data_cursor = result->stored_data->data_cursor; + result->stored_data->data_cursor = data_cursor; + mysqlnd_buffered_free_previous_row(result, START_FREEING_AFTER_X_ROWS TSRMLS_CC); + result->stored_data->data_cursor = orig_data_cursor; + } if (NULL == data_cursor[0]) { result->stored_data->initialized_rows++; result->m.row_decoder( @@ -130,6 +140,7 @@ } data_cursor += field_count; } + DBG_INF_FMT("after heap=%lu real=%lu", zend_memory_usage(FALSE TSRMLS_CC), zend_memory_usage(TRUE TSRMLS_CC)); DBG_VOID_RETURN; } /* }}} */ @@ -186,6 +197,53 @@ /* }}} */ +/* {{{ mysqlnd_buffered_free_previous_row */ +static +void mysqlnd_buffered_free_previous_row(MYSQLND_RES *result, int which TSRMLS_DC) +{ + MYSQLND_RES_BUFFERED * set = result->stored_data; + + DBG_ENTER("mysqlnd_buffered_free_previous_row"); + + if (!set) { + DBG_VOID_RETURN; + } + + DBG_INF_FMT("which=%d result->field_count=%d data=%p data_cursor=%p", which, result->field_count
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dba/tests dba_cdb_make.phpt
iliaa Tue Jun 16 12:40:59 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/dba/tests dba_cdb_make.phpt Log: Fixed test http://cvs.php.net/viewvc.cgi/php-src/ext/dba/tests/dba_cdb_make.phpt?r1=1.4&r2=1.4.6.1&diff_format=u Index: php-src/ext/dba/tests/dba_cdb_make.phpt diff -u php-src/ext/dba/tests/dba_cdb_make.phpt:1.4 php-src/ext/dba/tests/dba_cdb_make.phpt:1.4.6.1 --- php-src/ext/dba/tests/dba_cdb_make.phpt:1.4 Thu Aug 12 00:38:01 2004 +++ php-src/ext/dba/tests/dba_cdb_make.phpt Tue Jun 16 12:40:59 2009 @@ -33,6 +33,7 @@ } ?> --EXPECT-- +PHP Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0 database handler: cdb_make string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" -string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" \ No newline at end of file +string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/math pow_basic.phpt pow_basic_64bit.phpt
wharmby Tue Jun 16 11:37:15 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/mathpow_basic_64bit.phpt pow_basic.phpt Log: Fix typo in test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic_64bit.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic_64bit.phpt diff -u php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.4.2 php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.4.3 --- php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.4.2Mon Jan 12 17:56:45 2009 +++ php-src/ext/standard/tests/math/pow_basic_64bit.phptTue Jun 16 11:37:14 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -99,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -116,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23.45 @@ -284,4 +267,4 @@ . Exponent = 2147483647 Result = -INF . Exponent = -2147483648 Result = 0 -===Done=== \ No newline at end of file +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic.phpt?r1=1.1.4.3&r2=1.1.4.4&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic.phpt diff -u php-src/ext/standard/tests/math/pow_basic.phpt:1.1.4.3 php-src/ext/standard/tests/math/pow_basic.phpt:1.1.4.4 --- php-src/ext/standard/tests/math/pow_basic.phpt:1.1.4.3 Mon Jan 12 17:56:45 2009 +++ php-src/ext/standard/tests/math/pow_basic.phpt Tue Jun 16 11:37:14 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -47,9 +47,7 @@ } ?> ===Done=== ---EXPECTF-- - - +--EXPECT-- Base = 23 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23 @@ -101,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -118,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23.45 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/math pow_basic.phpt pow_basic_64bit.phpt
wharmby Tue Jun 16 11:37:13 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/mathpow_basic_64bit.phpt pow_basic.phpt Log: Fix typo in test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic_64bit.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic_64bit.phpt diff -u php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.2.2 php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.2.3 --- php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1.2.2Mon Jan 12 17:56:28 2009 +++ php-src/ext/standard/tests/math/pow_basic_64bit.phptTue Jun 16 11:37:13 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -99,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -116,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23.45 @@ -284,4 +267,4 @@ . Exponent = 2147483647 Result = -INF . Exponent = -2147483648 Result = 0 -===Done=== \ No newline at end of file +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic.phpt diff -u php-src/ext/standard/tests/math/pow_basic.phpt:1.1.2.3 php-src/ext/standard/tests/math/pow_basic.phpt:1.1.2.4 --- php-src/ext/standard/tests/math/pow_basic.phpt:1.1.2.3 Mon Jan 12 17:56:27 2009 +++ php-src/ext/standard/tests/math/pow_basic.phpt Tue Jun 16 11:37:13 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -19,8 +19,8 @@ "23", "23.45", "2.345e1", - 2147483647, - -2147483648); + PHP_INT_MAX, + -PHP_INT_MAX - 1); $exponents = array(0, 1, @@ -47,9 +47,7 @@ } ?> ===Done=== ---EXPECTF-- - - +--EXPECT-- Base = 23 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23 @@ -101,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -118,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent =
[PHP-CVS] cvs: php-src /ext/standard/tests/math pow_basic.phpt pow_basic_64bit.phpt
wharmby Tue Jun 16 11:37:12 2009 UTC Modified files: /php-src/ext/standard/tests/mathpow_basic.phpt pow_basic_64bit.phpt Log: Fix typo in test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic.phpt diff -u php-src/ext/standard/tests/math/pow_basic.phpt:1.3 php-src/ext/standard/tests/math/pow_basic.phpt:1.4 --- php-src/ext/standard/tests/math/pow_basic.phpt:1.3 Mon Jan 12 17:56:09 2009 +++ php-src/ext/standard/tests/math/pow_basic.phpt Tue Jun 16 11:37:11 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -47,9 +47,7 @@ } ?> ===Done=== ---EXPECTF-- - - +--EXPECT-- Base = 23 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23 @@ -101,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -118,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23.45 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/pow_basic_64bit.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/math/pow_basic_64bit.phpt diff -u php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1 php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.2 --- php-src/ext/standard/tests/math/pow_basic_64bit.phpt:1.1Mon Jan 12 17:56:09 2009 +++ php-src/ext/standard/tests/math/pow_basic_64bit.phptTue Jun 16 11:37:11 2009 @@ -11,7 +11,7 @@ $bases = array(23, -23, 23.1, - -23,1, + -23.1, 2.345e1, -2.345e1, 0x17, @@ -99,14 +99,14 @@ -Base = -23 +Base = -23.1 . Exponent = 0 Result = 1 -. Exponent = 1 Result = -23 -. Exponent = -1 Result = -0.043478260869565 -. Exponent = 2 Result = 529 -. Exponent = -2 Result = 0.001890359168242 -. Exponent = 3 Result = -12167 -. Exponent = -3 Result = -8.2189529053999E-5 +. Exponent = 1 Result = -23.1 +. Exponent = -1 Result = -0.043290043290043 +. Exponent = 2 Result = 533.61 +. Exponent = -2 Result = 0.0018740278480538 +. Exponent = 3 Result = -12326.391 +. Exponent = -3 Result = -8.1126746668997E-5 . Exponent = 2.5 Result = NAN . Exponent = -2.5 Result = NAN . Exponent = 500 Result = INF @@ -116,23 +116,6 @@ -Base = 1 -. Exponent = 0 Result = 1 -. Exponent = 1 Result = 1 -. Exponent = -1 Result = 1 -. Exponent = 2 Result = 1 -. Exponent = -2 Result = 1 -. Exponent = 3 Result = 1 -. Exponent = -3 Result = 1 -. Exponent = 2.5 Result = 1 -. Exponent = -2.5 Result = 1 -. Exponent = 500 Result = 1 -. Exponent = -500 Result = 1 -. Exponent = 2147483647 Result = 1 -. Exponent = -2147483648 Result = 1 - - - Base = 23.45 . Exponent = 0 Result = 1 . Exponent = 1 Result = 23.45 @@ -284,4 +267,4 @@ . Exponent = 2147483647 Result = -INF . Exponent = -2147483648 Result = 0 -===Done=== \ No newline at end of file +===Done=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file bug41874.phpt
pajoye Tue Jun 16 10:37:59 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filebug41874.phpt Log: - fix title http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/tests/file/bug41874.phpt diff -u php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.3 php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.3 Tue Jun 16 10:37:30 2009 +++ php-src/ext/standard/tests/file/bug41874.phpt Tue Jun 16 10:37:59 2009 @@ -1,5 +1,5 @@ --TEST-- -bug #42143 (Separate STDOUT and STDERR in exec functions) +bug #41874 (Separate STDOUT and STDERR in exec functions) http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file bug41874.phpt
pajoye Tue Jun 16 10:37:30 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filebug41874.phpt Log: - fix title http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/bug41874.phpt diff -u php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.2 php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/bug41874.phpt:1.1.2.2 Tue Jun 16 00:13:56 2009 +++ php-src/ext/standard/tests/file/bug41874.phpt Tue Jun 16 10:37:30 2009 @@ -1,5 +1,5 @@ --TEST-- -bug #42143 (The constant NAN is reported as 0 on Windows build) +bug #42143 (Separate STDOUT and STDERR in exec functions) --EXPECT-- The system cannot find the drive specified. -The system cannot find the drive specified. \ No newline at end of file +The system cannot find the drive specified. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_block_alloc.c mysqlnd_block_alloc.h mysqlnd_ps.c mysqlnd_result.c mysqlnd_structs.h mysqlnd_wireprotocol.c
andrey Tue Jun 16 09:15:38 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd_block_alloc.c mysqlnd_block_alloc.h mysqlnd_ps.c mysqlnd_result.c mysqlnd_structs.h mysqlnd_wireprotocol.c Log: MFH: Hardwire function call instead of using callbacks. We don't actually need callbacks, it was done for making 2 functions static, not to pollute the global functions space but that had its price of 8 bytes overheat per allocation, which is just too much. Also making the app member 32b instead of 64b, which should save additional 4 byte, to the total of 12 byte per allocation of a row buffer. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_block_alloc.c?r1=1.1.2.6&r2=1.1.2.7&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_block_alloc.c diff -u php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.6 php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.7 --- php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.6 Thu Jun 11 08:52:06 2009 +++ php-src/ext/mysqlnd/mysqlnd_block_alloc.c Tue Jun 16 09:15:38 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_block_alloc.c,v 1.1.2.6 2009/06/11 08:52:06 andrey Exp $ */ +/* $Id: mysqlnd_block_alloc.c,v 1.1.2.7 2009/06/16 09:15:38 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" @@ -35,7 +35,7 @@ DBG_ENTER("mysqlnd_mempool_dtor"); for (i = 0; i < pool->free_chunk_list_elements; i++) { MYSQLND_MEMORY_POOL_CHUNK * chunk = pool->free_chunk_list[i]; - chunk->free_chunk(chunk, FALSE TSRMLS_CC); + mysqlnd_mempool_free_chunk(chunk, FALSE TSRMLS_CC); } DBG_VOID_RETURN; @@ -44,11 +44,14 @@ /* {{{ mysqlnd_mempool_free_chunk */ -static void +void mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, zend_bool cache_it TSRMLS_DC) { MYSQLND_MEMORY_POOL * pool = chunk->pool; DBG_ENTER("mysqlnd_mempool_free_chunk"); + if (!chunk) { + DBG_VOID_RETURN; + } if (chunk->from_pool) { /* Try to back-off and guess if this is the last block allocated */ if (chunk->ptr == (pool->arena + (pool->arena_size - pool->free_size - chunk->size))) { @@ -60,14 +63,14 @@ } pool->refcount--; } else { - mnd_free(chunk->ptr); + mnd_efree(chunk->ptr); } if (cache_it && pool->free_chunk_list_elements < MYSQLND_MEMORY_POOL_CHUNK_LIST_SIZE) { chunk->ptr = NULL; pool->free_chunk_list[pool->free_chunk_list_elements++] = chunk; } else { /* We did not cache it -> free it */ - mnd_free(chunk); + mnd_efree(chunk); } DBG_VOID_RETURN; } @@ -75,7 +78,7 @@ /* {{{ mysqlnd_mempool_resize_chunk */ -static void +void mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size TSRMLS_DC) { DBG_ENTER("mysqlnd_mempool_resize_chunk"); @@ -132,11 +135,9 @@ if (pool->free_chunk_list_elements) { chunk = pool->free_chunk_list[--pool->free_chunk_list_elements]; } else { - chunk = mnd_malloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); + chunk = mnd_emalloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); } - chunk->free_chunk = mysqlnd_mempool_free_chunk; - chunk->resize_chunk = mysqlnd_mempool_resize_chunk; chunk->size = size; /* Should not go over MYSQLND_MAX_PACKET_SIZE, since we @@ -145,7 +146,7 @@ */ chunk->pool = pool; if (size > pool->free_size) { - chunk->ptr = mnd_malloc(size); + chunk->ptr = mnd_emalloc(size); chunk->from_pool = FALSE; } else { chunk->from_pool = TRUE; @@ -164,13 +165,13 @@ mysqlnd_mempool_create(size_t arena_size TSRMLS_DC) { /* We calloc, because we free(). We don't mnd_calloc() for a reason. */ - MYSQLND_MEMORY_POOL * ret = mnd_calloc(1, sizeof(MYSQLND_MEMORY_POOL)); + MYSQLND_MEMORY_POOL * ret = mnd_ecalloc(1, sizeof(MYSQLND_MEMORY_POOL)); DBG_ENTER("mysqlnd_mempool_create"); ret->free_size = ret->arena_size = arena_size; ret->refcount = 0; /* OOM ? */ - ret->arena = mnd_malloc(ret->arena_size); + ret->arena = mnd_emalloc(ret->arena_size); ret->get_chunk = mysqlnd_mempool_get_chunk; DBG_RETURN(ret); @@ -186,8 +187,8 @@ if (pool) { /* mnd_free will reference LOCK_access and might crash, depending on the caller...*/ mysqlnd_mempool_free_contents(pool TSRMLS_CC); - mnd_free(pool->arena); - mnd_free(pool); + mnd_efree(pool->arena); + mnd_efre
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_block_alloc.c mysqlnd_block_alloc.h mysqlnd_ps.c mysqlnd_result.c mysqlnd_structs.h mysqlnd_wireprotocol.c
andrey Tue Jun 16 09:15:10 2009 UTC Modified files: /php-src/ext/mysqlndmysqlnd_block_alloc.c mysqlnd_block_alloc.h mysqlnd_ps.c mysqlnd_result.c mysqlnd_structs.h mysqlnd_wireprotocol.c Log: Hardwire function call instead of using callbacks. We don't actually need callbacks, it was done for making 2 functions static, not to pollute the global functions space but that had its price of 8 bytes overheat per allocation, which is just too much. Also making the app member 32b instead of 64b, which should save additional 4 byte, to the total of 12 byte per allocation of a row buffer. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_block_alloc.c?r1=1.9&r2=1.10&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_block_alloc.c diff -u php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.9 php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.10 --- php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.9 Thu Jun 11 08:51:20 2009 +++ php-src/ext/mysqlnd/mysqlnd_block_alloc.c Tue Jun 16 09:15:09 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_block_alloc.c,v 1.9 2009/06/11 08:51:20 andrey Exp $ */ +/* $Id: mysqlnd_block_alloc.c,v 1.10 2009/06/16 09:15:09 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" @@ -35,7 +35,7 @@ DBG_ENTER("mysqlnd_mempool_dtor"); for (i = 0; i < pool->free_chunk_list_elements; i++) { MYSQLND_MEMORY_POOL_CHUNK * chunk = pool->free_chunk_list[i]; - chunk->free_chunk(chunk, FALSE TSRMLS_CC); + mysqlnd_mempool_free_chunk(chunk, FALSE TSRMLS_CC); } DBG_VOID_RETURN; @@ -44,11 +44,14 @@ /* {{{ mysqlnd_mempool_free_chunk */ -static void +void mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, zend_bool cache_it TSRMLS_DC) { MYSQLND_MEMORY_POOL * pool = chunk->pool; DBG_ENTER("mysqlnd_mempool_free_chunk"); + if (!chunk) { + DBG_VOID_RETURN; + } if (chunk->from_pool) { /* Try to back-off and guess if this is the last block allocated */ if (chunk->ptr == (pool->arena + (pool->arena_size - pool->free_size - chunk->size))) { @@ -60,14 +63,14 @@ } pool->refcount--; } else { - mnd_free(chunk->ptr); + mnd_efree(chunk->ptr); } if (cache_it && pool->free_chunk_list_elements < MYSQLND_MEMORY_POOL_CHUNK_LIST_SIZE) { chunk->ptr = NULL; pool->free_chunk_list[pool->free_chunk_list_elements++] = chunk; } else { /* We did not cache it -> free it */ - mnd_free(chunk); + mnd_efree(chunk); } DBG_VOID_RETURN; } @@ -75,7 +78,7 @@ /* {{{ mysqlnd_mempool_resize_chunk */ -static void +void mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size TSRMLS_DC) { DBG_ENTER("mysqlnd_mempool_resize_chunk"); @@ -132,11 +135,9 @@ if (pool->free_chunk_list_elements) { chunk = pool->free_chunk_list[--pool->free_chunk_list_elements]; } else { - chunk = mnd_malloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); + chunk = mnd_emalloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); } - chunk->free_chunk = mysqlnd_mempool_free_chunk; - chunk->resize_chunk = mysqlnd_mempool_resize_chunk; chunk->size = size; /* Should not go over MYSQLND_MAX_PACKET_SIZE, since we @@ -145,7 +146,7 @@ */ chunk->pool = pool; if (size > pool->free_size) { - chunk->ptr = mnd_malloc(size); + chunk->ptr = mnd_emalloc(size); chunk->from_pool = FALSE; } else { chunk->from_pool = TRUE; @@ -164,13 +165,13 @@ mysqlnd_mempool_create(size_t arena_size TSRMLS_DC) { /* We calloc, because we free(). We don't mnd_calloc() for a reason. */ - MYSQLND_MEMORY_POOL * ret = mnd_calloc(1, sizeof(MYSQLND_MEMORY_POOL)); + MYSQLND_MEMORY_POOL * ret = mnd_ecalloc(1, sizeof(MYSQLND_MEMORY_POOL)); DBG_ENTER("mysqlnd_mempool_create"); ret->free_size = ret->arena_size = arena_size; ret->refcount = 0; /* OOM ? */ - ret->arena = mnd_malloc(ret->arena_size); + ret->arena = mnd_emalloc(ret->arena_size); ret->get_chunk = mysqlnd_mempool_get_chunk; DBG_RETURN(ret); @@ -186,8 +187,8 @@ if (pool) { /* mnd_free will reference LOCK_access and might crash, depending on the caller...*/ mysqlnd_mempool_free_contents(pool TSRMLS_CC); - mnd_free(pool->arena); - mnd_free(pool); + mnd_efree(pool->arena); + mnd_efree(pool); } DBG_VOID_RETURN;
[PHP-CVS] cvs: php-src /ext/standard/tests/class_object AutoInterface.inc AutoLoaded.inc AutoTest.inc get_class_vars_error.phpt get_class_vars_variation1.phpt get_class_vars_variation2.phpt get_declar
wharmby Tue Jun 16 08:59:42 2009 UTC Modified files: /php-src/ext/standard/tests/class_object interface_exists_variation3.phpt is_subclass_of_variation_004.phpt get_declared_classes_variation1.phpt interface_exists_variation1.phpt AutoTest.inc property_exists_variation1.phpt AutoInterface.inc interface_exists_variation4.phpt AutoLoaded.inc interface_exists_error.phpt get_class_vars_variation1.phpt interface_exists_variation2.phpt get_class_vars_variation2.phpt property_exists_error.phpt get_declared_interfaces_variation1.phpt get_class_vars_error.phpt Log: New class related tests. Tested on Windows, Linux and Linux 64. Tests written by Iain Lewis http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt diff -u /dev/null php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt:1.2 --- /dev/null Tue Jun 16 08:59:42 2009 +++ php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt Tue Jun 16 08:59:42 2009 @@ -0,0 +1,35 @@ +--TEST-- +Test interface_exists() function : autoloaded interface +--FILE-- + +--EXPECTF-- +*** Testing interface_exists() : autoloaded interface *** + +-- no autoloading -- +bool(false) + +-- with autoloading -- +bool(true) + +DONE \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt diff -u /dev/null php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt:1.2 --- /dev/null Tue Jun 16 08:59:42 2009 +++ php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt Tue Jun 16 08:59:42 2009 @@ -0,0 +1,180 @@ +--TEST-- +Test is_subclass_of() function : usage variations - unexpected type for arg 1 with valid class in arg 2. +--FILE-- + 'red', 'item' => 'pen'), + + // null data + NULL, + null, + + // boolean data + true, + false, + TRUE, + FALSE, + + // empty data + "", + '', + + // string data + "string", + 'String', + + // undefined data + $undefined_var, + + // unset data + $unset_var, +); + +// loop through each element of the array for object + +foreach($values as $value) { + echo "\nArg value $value \n"; + var_dump( is_subclass_of($value, $class_name) ); +}; + +?> +===DONE=== +--EXPECTF-- +*** Testing is_subclass_of() : usage variations *** +Error: 8 - Undefined variable: undefined_var, %sis_subclass_of_variation_004.php(69) +Error: 8 - Undefined variable: unset_var, %sis_subclass_of_variation_004.php(72) + +Arg value 0 +bool(false) + +Arg value 1 +bool(false) + +Arg value 12345 +bool(false) + +Arg value -2345 +bool(false) + +Arg value 10.5 +bool(false) + +Arg value -10.5 +bool(false) + +Arg value 101234567000 +bool(false) + +Arg value 1.07654321E-9 +bool(false) + +Arg value 0.5 +bool(false) +Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(78) + +Arg value Array +bool(false) +Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(78) + +Arg value Array +bool(false) +Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(78) + +Arg value Array +bool(false) +Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(78) + +Arg value Array +bool(false) +Error: 8 - Array to string conversion, %sis_subclass_of_variation_004.php(78) + +Arg value Array +bool(false) + +Arg value +bool(false) + +Arg value +bool(false) + +Arg value 1 +bool(false) + +Arg value +bool(false) + +Arg value 1 +bool(false) + +Arg value +bool(false) + +Arg value +Error: 2 - Unknown class passed as parameter, %sis_subclass_of_variation_004.php(79) +bool(false) + +Arg value +Error: 2 - Unknown class passed as parameter, %sis_subclass_of_variation_004.php(79) +bool(false) + +Arg value string +In __autoload(string) +Error: 2 - Unknown class passed as parameter, %sis_subclass_of_variation_004
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/class_object AutoInterface.inc AutoLoaded.inc AutoTest.inc get_class_vars_error.phpt get_class_vars_variation1.phpt get_class_vars_variation2.phpt g
wharmby Tue Jun 16 08:59:40 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/class_objectAutoLoaded.inc AutoTest.inc get_declared_interfaces_variation1.phpt property_exists_variation1.phpt property_exists_error.phpt interface_exists_variation1.phpt is_subclass_of_variation_004.phpt interface_exists_variation4.phpt interface_exists_variation3.phpt AutoInterface.inc get_declared_classes_variation1.phpt get_class_vars_error.phpt get_class_vars_variation1.phpt interface_exists_variation2.phpt get_class_vars_variation2.phpt interface_exists_error.phpt Log: New class related tests. Tested on Windows, Linux and Linux 64. Tests written by Iain Lewis http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoLoaded.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoLoaded.inc +++ php-src/ext/standard/tests/class_object/AutoLoaded.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoTest.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoTest.inc +++ php-src/ext/standard/tests/class_object/AutoTest.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt +++ php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/property_exists_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/property_exists_variation1.phpt +++ php-src/ext/standard/tests/class_object/property_exists_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/property_exists_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/property_exists_error.phpt +++ php-src/ext/standard/tests/class_object/property_exists_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt +++ php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoInterface.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoInterface.inc +++ php-src/ext/standard/tests/class_object/AutoInterface.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt +++ php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_vars_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_class_vars_error.phpt +++ php-src/ext/standard/tests/class_object/get_class_vars_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_vars_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_class_vars_variation1.phpt +++ php-src/ext/standard/tests/class_object/get_class_vars_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/class_object AutoInterface.inc AutoLoaded.inc AutoTest.inc get_class_vars_error.phpt get_class_vars_variation1.phpt get_class_vars_variation2.phpt g
wharmby Tue Jun 16 08:59:39 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/class_objectAutoTest.inc is_subclass_of_variation_004.phpt AutoInterface.inc get_declared_classes_variation1.phpt interface_exists_variation2.phpt get_class_vars_variation2.phpt property_exists_error.phpt interface_exists_variation4.phpt AutoLoaded.inc get_declared_interfaces_variation1.phpt interface_exists_error.phpt get_class_vars_error.phpt interface_exists_variation1.phpt property_exists_variation1.phpt get_class_vars_variation1.phpt interface_exists_variation3.phpt Log: New class related tests. Tested on Windows, Linux and Linux 64. Tests written by Iain Lewis http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoTest.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoTest.inc +++ php-src/ext/standard/tests/class_object/AutoTest.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt +++ php-src/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoInterface.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoInterface.inc +++ php-src/ext/standard/tests/class_object/AutoInterface.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt +++ php-src/ext/standard/tests/class_object/get_declared_classes_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation2.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation2.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_vars_variation2.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_class_vars_variation2.phpt +++ php-src/ext/standard/tests/class_object/get_class_vars_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/property_exists_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/property_exists_error.phpt +++ php-src/ext/standard/tests/class_object/property_exists_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/AutoLoaded.inc?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/AutoLoaded.inc +++ php-src/ext/standard/tests/class_object/AutoLoaded.inc http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt +++ php-src/ext/standard/tests/class_object/get_declared_interfaces_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_error.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_vars_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/get_class_vars_error.phpt +++ php-src/ext/standard/tests/class_object/get_class_vars_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt +++ php-src/ext/standard/tests/class_object/interface_exists_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object
[PHP-CVS] Re: [PHP-DEV] Last steps towards 5.3.0
On 10.06.2009, at 16:43, Johannes Schlüter wrote: June 10th (today): We package RC3, until then only critical build fixes and similar which have to go in the RC, after review (highlight me on IRC, mail etc.) June 11th: RC3 will be released June 11th-17th A small window for critical fixes and again please check beforehand as we don't want to introduce any new bugs that late in the game. June 17th In case there were commits after RC3 we will package a RC 4 on Wednesday next week Ok, we are here now. So we are in a commit freeze as of this morning until sometime Wednesday. When we have tagged RC4, please only commit to 5_3 with the explicit blessing of Johannes until we release 5_3 stable or announce an extension of the RC phase. So far I want to get clarification on how set_magic_quotes_runtime(0) behaves in PHP6. I also talked to Pierre about the late changes in windows (which Johannes and I were aware of since weeks). Its clear that this change will not hold up any releases. Pierre will revert if necessary. June 18th If needed publish RC4 June 18th - June 24th The plan is to repackage RC4 as 5.3.0 final in the beginning of the week of the 21st without any further changes so we can test the packages. In case something critical, unexpected, pops up please notify us asap. June 25th 2009 Release PHP 5.3.0 final. We are still on track for this one. regards, Lukas Kahwe Smith m...@pooteeweet.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_palloc.c
andrey Tue Jun 16 07:53:35 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd_palloc.c Log: MFH: Use Zend's allocator instead of libc's and also don't try to work on zvals that are NULLs. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.c?r1=1.2.2.18&r2=1.2.2.19&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_palloc.c diff -u php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.18 php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.19 --- php-src/ext/mysqlnd/mysqlnd_palloc.c:1.2.2.18 Thu Jun 11 08:30:08 2009 +++ php-src/ext/mysqlnd/mysqlnd_palloc.cTue Jun 16 07:53:35 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_palloc.c,v 1.2.2.18 2009/06/11 08:30:08 andrey Exp $ */ +/* $Id: mysqlnd_palloc.c,v 1.2.2.19 2009/06/16 07:53:35 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -139,7 +139,7 @@ /* {{{ _mysqlnd_palloc_init_thd_cache */ MYSQLND_THD_ZVAL_PCACHE* mysqlnd_palloc_init_thd_cache(MYSQLND_ZVAL_PCACHE * const cache TSRMLS_DC) { - MYSQLND_THD_ZVAL_PCACHE *ret = calloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE)); + MYSQLND_THD_ZVAL_PCACHE *ret = mnd_ecalloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE)); DBG_ENTER("_mysqlnd_palloc_init_thd_cache"); DBG_INF_FMT("ret = %p", ret); @@ -161,7 +161,7 @@ ret->references = 1; /* 1. Initialize the GC list */ - ret->gc_list.ptr_line = calloc(cache->max_items, sizeof(mysqlnd_zval *)); + ret->gc_list.ptr_line = mnd_ecalloc(cache->max_items, sizeof(mysqlnd_zval *)); /* Backward and forward looping is possible */ ret->gc_list.last_added = ret->gc_list.ptr_line; ret->gc_list.canary1 = (void*)0xCAFE; @@ -233,8 +233,8 @@ UNLOCK_PCACHE(global_cache); } - mnd_free(thd_cache->gc_list.ptr_line); - mnd_free(thd_cache); + mnd_efree(thd_cache->gc_list.ptr_line); + mnd_efree(thd_cache); DBG_VOID_RETURN; } @@ -413,6 +413,9 @@ { MYSQLND_ZVAL_PCACHE *cache; DBG_ENTER("mysqlnd_palloc_zval_ptr_dtor"); + if (!*zv) { + DBG_VOID_RETURN; + } if (thd_cache) { DBG_INF_FMT("cache=%p parent_block=%p last_in_block=%p *zv=%p refc=%d type=%d ", thd_cache, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_palloc.c
andrey Tue Jun 16 07:53:03 2009 UTC Modified files: /php-src/ext/mysqlndmysqlnd_palloc.c Log: Use Zend's allocator instead of libc's and also don't try to work on zvals that are NULLs. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_palloc.c?r1=1.19&r2=1.20&diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_palloc.c diff -u php-src/ext/mysqlnd/mysqlnd_palloc.c:1.19 php-src/ext/mysqlnd/mysqlnd_palloc.c:1.20 --- php-src/ext/mysqlnd/mysqlnd_palloc.c:1.19 Thu Jun 11 08:31:10 2009 +++ php-src/ext/mysqlnd/mysqlnd_palloc.cTue Jun 16 07:53:03 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_palloc.c,v 1.19 2009/06/11 08:31:10 andrey Exp $ */ +/* $Id: mysqlnd_palloc.c,v 1.20 2009/06/16 07:53:03 andrey Exp $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -139,7 +139,7 @@ /* {{{ _mysqlnd_palloc_init_thd_cache */ MYSQLND_THD_ZVAL_PCACHE* mysqlnd_palloc_init_thd_cache(MYSQLND_ZVAL_PCACHE * const cache TSRMLS_DC) { - MYSQLND_THD_ZVAL_PCACHE *ret = calloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE)); + MYSQLND_THD_ZVAL_PCACHE *ret = mnd_ecalloc(1, sizeof(MYSQLND_THD_ZVAL_PCACHE)); DBG_ENTER("_mysqlnd_palloc_init_thd_cache"); DBG_INF_FMT("ret = %p", ret); @@ -161,7 +161,7 @@ ret->references = 1; /* 1. Initialize the GC list */ - ret->gc_list.ptr_line = calloc(cache->max_items, sizeof(mysqlnd_zval *)); + ret->gc_list.ptr_line = mnd_ecalloc(cache->max_items, sizeof(mysqlnd_zval *)); /* Backward and forward looping is possible */ ret->gc_list.last_added = ret->gc_list.ptr_line; ret->gc_list.canary1 = (void*)0xCAFE; @@ -233,8 +233,8 @@ UNLOCK_PCACHE(global_cache); } - mnd_free(thd_cache->gc_list.ptr_line); - mnd_free(thd_cache); + mnd_efree(thd_cache->gc_list.ptr_line); + mnd_efree(thd_cache); DBG_VOID_RETURN; } @@ -413,6 +413,9 @@ { MYSQLND_ZVAL_PCACHE *cache; DBG_ENTER("mysqlnd_palloc_zval_ptr_dtor"); + if (!*zv) { + DBG_VOID_RETURN; + } if (thd_cache) { DBG_INF_FMT("cache=%p parent_block=%p last_in_block=%p *zv=%p refc=%d type=%d ", thd_cache, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php