[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_alloc.c
dmitry Tue, 31 May 2011 08:26:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311627 Log: Fixed bug #54957 (Memleak in alloc_globals_ctor) Bug: http://bugs.php.net/54957 (Assigned) Memleak in alloc_globals_ctor Changed paths: U php/php-src/trunk/Zend/zend_alloc.c Modified: php/php-src/trunk/Zend/zend_alloc.c === --- php/php-src/trunk/Zend/zend_alloc.c 2011-05-31 08:19:14 UTC (rev 311626) +++ php/php-src/trunk/Zend/zend_alloc.c 2011-05-31 08:26:53 UTC (rev 311627) @@ -1602,6 +1602,9 @@ int internal; if (!heap-use_zend_alloc) { + if (full_shutdown) { + free(heap); + } return; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c branches/PHP_5_4/ext/pdo_pgsql/php_pdo
iliaaTue, 31 May 2011 08:59:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311631 Log: Removed unnecessary rinit/rshutdown Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h U php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c U php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h U php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c U php/php-src/trunk/ext/pdo_pgsql/php_pdo_pgsql.h Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:58:28 UTC (rev 311630) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:59:32 UTC (rev 311631) @@ -67,8 +67,8 @@ pdo_pgsql_functions, PHP_MINIT(pdo_pgsql), PHP_MSHUTDOWN(pdo_pgsql), - PHP_RINIT(pdo_pgsql), - PHP_RSHUTDOWN(pdo_pgsql), + NULL, + NULL, PHP_MINFO(pdo_pgsql), 1.0.2, STANDARD_MODULE_PROPERTIES @@ -106,24 +106,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(pdo_pgsql) -{ - /* php_pdo_register_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(pdo_pgsql) -{ - /* php_pdo_unregister_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(pdo_pgsql) Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h 2011-05-31 08:58:28 UTC (rev 311630) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h 2011-05-31 08:59:32 UTC (rev 311631) @@ -32,8 +32,6 @@ PHP_MINIT_FUNCTION(pdo_pgsql); PHP_MSHUTDOWN_FUNCTION(pdo_pgsql); -PHP_RINIT_FUNCTION(pdo_pgsql); -PHP_RSHUTDOWN_FUNCTION(pdo_pgsql); PHP_MINFO_FUNCTION(pdo_pgsql); #endif /* PHP_PDO_PGSQL_H */ Modified: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c === --- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:58:28 UTC (rev 311630) +++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:59:32 UTC (rev 311631) @@ -67,8 +67,8 @@ pdo_pgsql_functions, PHP_MINIT(pdo_pgsql), PHP_MSHUTDOWN(pdo_pgsql), - PHP_RINIT(pdo_pgsql), - PHP_RSHUTDOWN(pdo_pgsql), + NULL, + NULL, PHP_MINFO(pdo_pgsql), 1.0.2, STANDARD_MODULE_PROPERTIES @@ -106,24 +106,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(pdo_pgsql) -{ - /* php_pdo_register_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(pdo_pgsql) -{ - /* php_pdo_unregister_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(pdo_pgsql) Modified: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h === --- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h 2011-05-31 08:58:28 UTC (rev 311630) +++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h 2011-05-31 08:59:32 UTC (rev 311631) @@ -32,8 +32,6 @@ PHP_MINIT_FUNCTION(pdo_pgsql); PHP_MSHUTDOWN_FUNCTION(pdo_pgsql); -PHP_RINIT_FUNCTION(pdo_pgsql); -PHP_RSHUTDOWN_FUNCTION(pdo_pgsql); PHP_MINFO_FUNCTION(pdo_pgsql); #endif /* PHP_PDO_PGSQL_H */ Modified: php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c === --- php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:58:28 UTC (rev 311630) +++ php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:59:32 UTC (rev 311631) @@ -67,8 +67,8 @@ pdo_pgsql_functions, PHP_MINIT(pdo_pgsql), PHP_MSHUTDOWN(pdo_pgsql), - PHP_RINIT(pdo_pgsql), - PHP_RSHUTDOWN(pdo_pgsql), + NULL, + NULL, PHP_MINFO(pdo_pgsql), 1.0.2, STANDARD_MODULE_PROPERTIES @@ -106,24 +106,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(pdo_pgsql) -{ - /* php_pdo_register_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(pdo_pgsql) -{ - /* php_pdo_unregister_driver(pdo_pgsql_driver); */ - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(pdo_pgsql) Modified: php/php-src/trunk/ext/pdo_pgsql/php_pdo_pgsql.h === ---
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/ is_in_transaction.phpt
iliaaTue, 31 May 2011 09:01:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311632 Log: Removed test for functionality available in 5.4+ Changed paths: D php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt Deleted: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt 2011-05-31 08:59:32 UTC (rev 311631) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt 2011-05-31 09:01:44 UTC (rev 311632) @@ -1,66 +0,0 @@ ---TEST-- -PDO PgSQL isInTransaction ---SKIPIF-- -?php # vim:se ft=php: -if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -PDOTest::skip(); -? ---FILE-- -?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); -$db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -$db-setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); - -$db-exec('CREATE TABLE test (a integer not null primary key, b text)'); - -$db-beginTransaction(); -try { -echo Test PDO::PGSQL_TRANSACTION_INTRANS\n; -var_dump($db-inTransaction()); - -$stmt = $db-prepare(INSERT INTO test (a, b) values (?, ?)); -$stmt-bindValue(1, 1); -$stmt-bindValue(2, test insert); -$stmt-execute(); - -$db-commit(); - -echo Test PDO::PGSQL_TRANSACTION_IDLE\n; -var_dump($db-inTransaction()); - -$db-beginTransaction(); - -try { -$stmt = $db-prepare(INSERT INTO test (a, b) values (?, ?)); -$stmt-bindValue(1, error); -$stmt-bindValue(2, test insert); -$stmt-execute(); -} catch (Exception $e) { - /* We catch the exception because the execute will give error and we must test the PDO::PGSQL_TRANSACTION_ERROR */ - echo Test PDO::PGSQL_TRANSACTION_INERROR\n; - var_dump($db-inTransaction()); - $db-rollBack(); -} - -echo Test PDO::PGSQL_TRANSACTION_IDLE\n; -var_dump($db-inTransaction()); - -} catch (Exception $e) { - /* catch exceptions so that we can show the relative error */ - echo Exception! at line , $e-getLine(), \n; - var_dump($e-getMessage()); -} - -? ---EXPECT-- -Test PDO::PGSQL_TRANSACTION_INTRANS -int(2) -Test PDO::PGSQL_TRANSACTION_IDLE -int(0) -Test PDO::PGSQL_TRANSACTION_INERROR -int(3) -Test PDO::PGSQL_TRANSACTION_IDLE -int(0) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54910.phpt branches/PHP_5_3/Zend/zend_API.c trunk/Zend/tests/bug54910.phpt trunk/Zend/zend_API.c
dmitry Tue, 31 May 2011 09:20:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311635 Log: Fixed bug #54910 (Crash when calling call_user_func with unknown function name) Bug: http://bugs.php.net/54910 (Assigned) Crash when calling call_user_func with unknown function name Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt U php/php-src/branches/PHP_5_3/Zend/zend_API.c A php/php-src/trunk/Zend/tests/bug54910.phpt U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:20:51 UTC (rev 311635) @@ -6,6 +6,8 @@ - Increased the backtrack limit from 10 to 100 (Rasmus) - Zend Engine: + . Fixed bug #54910 (Crash when calling call_user_func with unknown function +name). (Dmitry) . Fixed bug #54804 (__halt_compiler and imported namespaces). (Pierrick, Felipe) . Fixed bug #54585 (track_errors causes segfault). (Dmitry) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { +public function __call($method, $args) { +if (stripos($method, 'get') === 0) { +return $this-get(); +} +die(No such method - '$method'\n); +} + +protected function get() { +$class = get_class($this); +$call = array($class, 'noSuchMethod'); + +if (is_callable($call)) { +call_user_func($call); +} +} +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2011-05-31 09:20:51 UTC (rev 311635) @@ -2590,6 +2590,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry + instanceof_function(Z_OBJCE_P(EG(This)), fcc-calling_scope TSRMLS_CC)) { + fcc-object_ptr = EG(This); + } } } } Added: php/php-src/trunk/Zend/tests/bug54910.phpt === --- php/php-src/trunk/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { +public function __call($method, $args) { +if (stripos($method, 'get') === 0) { +return $this-get(); +} +die(No such method - '$method'\n); +} + +protected function get() { +$class = get_class($this); +$call = array($class, 'noSuchMethod'); + +if (is_callable($call)) { +call_user_func($call); +} +} +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:20:51 UTC (rev 311635) @@ -2773,6 +2773,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry + instanceof_function(Z_OBJCE_P(EG(This)), fcc-calling_scope TSRMLS_CC)) { + fcc-object_ptr = EG(This); + } }
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54910.phpt branches/PHP_5_3/Zend/zend_API.c trunk/Zend/tests/bug54910.phpt trunk/Zend/zend_API.c
Please merge into 5.4 branch as well. Thanks On Tue, May 31, 2011 at 11:20 AM, Dmitry Stogov dmi...@php.net wrote: dmitry Tue, 31 May 2011 09:20:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311635 Log: Fixed bug #54910 (Crash when calling call_user_func with unknown function name) Bug: http://bugs.php.net/54910 (Assigned) Crash when calling call_user_func with unknown function name Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt U php/php-src/branches/PHP_5_3/Zend/zend_API.c A php/php-src/trunk/Zend/tests/bug54910.phpt U php/php-src/trunk/Zend/zend_API.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-31 09:20:51 UTC (rev 311635) @@ -6,6 +6,8 @@ - Increased the backtrack limit from 10 to 100 (Rasmus) - Zend Engine: + . Fixed bug #54910 (Crash when calling call_user_func with unknown function + name). (Dmitry) . Fixed bug #54804 (__halt_compiler and imported namespaces). (Pierrick, Felipe) . Fixed bug #54585 (track_errors causes segfault). (Dmitry) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { + public function __call($method, $args) { + if (stripos($method, 'get') === 0) { + return $this-get(); + } + die(No such method - '$method'\n); + } + + protected function get() { + $class = get_class($this); + $call = array($class, 'noSuchMethod'); + + if (is_callable($call)) { + call_user_func($call); + } + } +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c === --- php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c 2011-05-31 09:20:51 UTC (rev 311635) @@ -2590,6 +2590,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry + instanceof_function(Z_OBJCE_P(EG(This)), fcc-calling_scope TSRMLS_CC)) { + fcc-object_ptr = EG(This); + } } } } Added: php/php-src/trunk/Zend/tests/bug54910.phpt === --- php/php-src/trunk/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug54910.phpt 2011-05-31 09:20:51 UTC (rev 311635) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { + public function __call($method, $args) { + if (stripos($method, 'get') === 0) { + return $this-get(); + } + die(No such method - '$method'\n); + } + + protected function get() { + $class = get_class($this); + $call = array($class, 'noSuchMethod'); + + if (is_callable($call)) { + call_user_func($call); + } + } +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/trunk/Zend/zend_API.c === --- php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:18:23 UTC (rev 311634) +++ php/php-src/trunk/Zend/zend_API.c 2011-05-31 09:20:51 UTC (rev 311635) @@ -2773,6 +2773,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_priv.h branches/PHP_5_4/ext/mysqlnd/mysqlnd_priv.h trunk/ext/mysqlnd/mysqlnd_priv.h
andrey Tue, 31 May 2011 10:35:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311643 Log: fix macros Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_priv.h U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_priv.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_priv.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_priv.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_priv.h 2011-05-31 10:31:23 UTC (rev 311642) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_priv.h 2011-05-31 10:35:07 UTC (rev 311643) @@ -113,7 +113,7 @@ if ((message)) { \ (buf) = mnd_pestrndup((message), (len), (persistent)); \ } else { \ - buf = NULL; \ + (buf) = NULL; \ } \ (buf_len) = (len); \ } @@ -130,22 +130,22 @@ #define SET_EMPTY_ERROR(error_info) \ { \ - error_info.error_no = 0; \ - error_info.error[0] = '\0'; \ - strlcpy(error_info.sqlstate, 0, sizeof(error_info.sqlstate)); \ + (error_info).error_no = 0; \ + (error_info).error[0] = '\0'; \ + strlcpy((error_info).sqlstate, 0, sizeof((error_info).sqlstate)); \ } #define SET_CLIENT_ERROR(error_info, a, b, c) \ { \ - error_info.error_no = (a); \ - strlcpy(error_info.sqlstate, (b), sizeof(error_info.sqlstate)); \ - strlcpy(error_info.error, (c), sizeof(error_info.error)); \ + (error_info).error_no = (a); \ + strlcpy((error_info).sqlstate, (b), sizeof((error_info).sqlstate)); \ + strlcpy((error_info).error, (c), sizeof((error_info).error)); \ } -#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR(error_info, CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory) +#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR((error_info), CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory) -#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(stmt-error_info, a, b, c) +#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR((stmt)-error_info, a, b, c) #ifdef ZTS @@ -153,7 +153,7 @@ #define CONN_SET_STATE(c, s) (c)-m-set_state((c), (s) TSRMLS_CC) #else #define CONN_GET_STATE(c) ((c)-state) -#define CONN_SET_STATE(c, s) ((c)-state = s) +#define CONN_SET_STATE(c, s) ((c)-state = (s)) #endif Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_priv.h === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_priv.h 2011-05-31 10:31:23 UTC (rev 311642) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_priv.h 2011-05-31 10:35:07 UTC (rev 311643) @@ -114,7 +114,7 @@ if ((message)) { \ (buf) = mnd_pestrndup((message), (len), (persistent)); \ } else { \ - buf = NULL; \ + (buf) = NULL; \ } \ (buf_len) = (len); \ } @@ -131,22 +131,22 @@ #define SET_EMPTY_ERROR(error_info) \ { \ - error_info.error_no = 0; \ - error_info.error[0] = '\0'; \ - strlcpy(error_info.sqlstate, 0, sizeof(error_info.sqlstate)); \ + (error_info).error_no = 0; \ + (error_info).error[0] = '\0'; \ + strlcpy((error_info).sqlstate, 0, sizeof((error_info).sqlstate)); \ } #define SET_CLIENT_ERROR(error_info, a, b, c) \ { \ - error_info.error_no = (a); \ - strlcpy(error_info.sqlstate, (b), sizeof(error_info.sqlstate)); \ - strlcpy(error_info.error, (c), sizeof(error_info.error)); \ + (error_info).error_no = (a); \ + strlcpy((error_info).sqlstate, (b), sizeof((error_info).sqlstate)); \ + strlcpy((error_info).error, (c), sizeof((error_info).error)); \ } -#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR(error_info, CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory) +#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR((error_info), CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory) -#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(stmt-error_info, a, b, c) +#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR((stmt)-error_info, a, b, c) #ifdef ZTS @@ -154,7 +154,7 @@ #define CONN_SET_STATE(c, s) (c)-m-set_state((c), (s) TSRMLS_CC) #else #define CONN_GET_STATE(c) ((c)-state) -#define CONN_SET_STATE(c, s) ((c)-state = s) +#define CONN_SET_STATE(c, s) ((c)-state = (s)) #endif Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_priv.h
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/Zend/ zend_alloc.c
dmitry Tue, 31 May 2011 11:38:31 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311654 Log: MFH: Fixed bug #54957 (Memleak in alloc_globals_ctor) Bug: http://bugs.php.net/54957 (Closed) Memleak in alloc_globals_ctor Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_alloc.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_alloc.c === --- php/php-src/branches/PHP_5_4/Zend/zend_alloc.c 2011-05-31 11:36:57 UTC (rev 311653) +++ php/php-src/branches/PHP_5_4/Zend/zend_alloc.c 2011-05-31 11:38:31 UTC (rev 311654) @@ -1602,6 +1602,9 @@ int internal; if (!heap-use_zend_alloc) { + if (full_shutdown) { + free(heap); + } return; } -- 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/curl/tests/curl_setopt_basic001.phpt trunk/ext/curl/tests/curl_setopt_basic001.phpt
sheinTue, 31 May 2011 12:45:00 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311663 Log: Removed test since there's no more safe_mode in PHP = 5.4. Changed paths: D php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt D php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt Deleted: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt 2011-05-31 12:05:25 UTC (rev 311662) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_setopt_basic001.phpt 2011-05-31 12:45:00 UTC (rev 311663) @@ -1,35 +0,0 @@ ---TEST-- -curl_setopt basic tests. ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---INI-- -safe_mode=On ---SKIPIF-- -?php if (!extension_loaded(curl) || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER') || PHP_VERSION_ID 503099) print skip; ? ---FILE-- -?php - -$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); - -// start testing -echo *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n; - -$url = {$host}/; -$ch = curl_init(); - -ob_start(); // start output buffering -curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - -$curl_content = curl_exec($ch); -curl_close($ch); - -var_dump( $curl_content ); -? ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 -*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode - -Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d -bool(false) - Deleted: php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt === --- php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt 2011-05-31 12:05:25 UTC (rev 311662) +++ php/php-src/trunk/ext/curl/tests/curl_setopt_basic001.phpt 2011-05-31 12:45:00 UTC (rev 311663) @@ -1,35 +0,0 @@ ---TEST-- -curl_setopt basic tests. ---CREDITS-- -Paul Sohier -#phptestfest utrecht ---INI-- -safe_mode=On ---SKIPIF-- -?php if (!extension_loaded(curl) || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER') || PHP_VERSION_ID 503099) print skip; ? ---FILE-- -?php - -$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); - -// start testing -echo *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n; - -$url = {$host}/; -$ch = curl_init(); - -ob_start(); // start output buffering -curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - -$curl_content = curl_exec($ch); -curl_close($ch); - -var_dump( $curl_content ); -? ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 -*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode - -Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d -bool(false) - -- 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/bug48207.phpt branches/PHP_5_4/ext/curl/tests/bug48207.phpt trunk/ext/curl/tests/bug48207.phpt
sheinTue, 31 May 2011 12:57:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311664 Log: Fixed notice breaking the test. Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt U php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt U php/php-src/trunk/ext/curl/tests/bug48207.phpt Modified: php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt === --- php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt 2011-05-31 12:45:00 UTC (rev 311663) +++ php/php-src/branches/PHP_5_3/ext/curl/tests/bug48207.phpt 2011-05-31 12:57:40 UTC (rev 311664) @@ -18,7 +18,7 @@ if(!empty($host)) { // Use the set Environment variable -$url = $host/get.php; +$url = $host/get.php?test=1; } else { Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt === --- php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt 2011-05-31 12:45:00 UTC (rev 311663) +++ php/php-src/branches/PHP_5_4/ext/curl/tests/bug48207.phpt 2011-05-31 12:57:40 UTC (rev 311664) @@ -18,7 +18,7 @@ if(!empty($host)) { // Use the set Environment variable -$url = $host/get.php; +$url = $host/get.php?test=1; } else { Modified: php/php-src/trunk/ext/curl/tests/bug48207.phpt === --- php/php-src/trunk/ext/curl/tests/bug48207.phpt 2011-05-31 12:45:00 UTC (rev 311663) +++ php/php-src/trunk/ext/curl/tests/bug48207.phpt 2011-05-31 12:57:40 UTC (rev 311664) @@ -18,7 +18,7 @@ if(!empty($host)) { // Use the set Environment variable -$url = $host/get.php; +$url = $host/get.php?test=1; } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
pajoye Tue, 31 May 2011 18:15:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311674 Log: - amqp karma for jtansavatdi Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2011-05-31 17:44:40 UTC (rev 311673) +++ SVNROOT/global_avail2011-05-31 18:15:49 UTC (rev 311674) @@ -339,6 +339,8 @@ avail|tpenner4d|pecl/pdo_4d,phpdoc avail|ianb|pecl/svm,phpdoc avail|michelec|pecl/rsync,phpdoc +avail|dsr|pecl/sam,phpdoc +avail|jtansavatdi|pecl/amqp,phpdoc # Objective-C bridge avail|wez,jan|php/php-objc @@ -355,7 +357,6 @@ avail|wez,dbs|php/php-src/*/ext/pdo_odbc avail|gcc,cem,mfp,ansriniv,slaws,chm,rs|pecl/sdo avail|dbs,kraman,kfbombar,ambrish|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm -avail|dsr|pecl/sam,phpdoc # PDO Specs. CLA required to commit unavail||php/php-src/*/ext/pdo/specs -- 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/mysqlnd/mysqlnd.c branches/PHP_5_4/ext/mysqlnd/mysqlnd.c trunk/ext/mysqlnd/mysqlnd.c
andrey Tue, 31 May 2011 20:42:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311676 Log: reuse code Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c U php/php-src/trunk/ext/mysqlnd/mysqlnd.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-05-31 19:04:52 UTC (rev 311675) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-05-31 20:42:44 UTC (rev 311676) @@ -896,25 +896,18 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND * conn, const char * query, unsigned int query_len TSRMLS_DC) { - enum_func_status ret; + enum_func_status ret = FAIL; DBG_ENTER(mysqlnd_conn::query); DBG_INF_FMT(conn=%llu query=%s, conn-thread_id, query); - if (PASS != conn-m-simple_command(conn, COM_QUERY, query, query_len, - PROT_LAST /* we will handle the OK packet*/, - FALSE, FALSE TSRMLS_CC)) { - DBG_RETURN(FAIL); + if (PASS == conn-m-send_query(conn, query, query_len TSRMLS_CC) + PASS == conn-m-reap_query(conn TSRMLS_CC)) + { + ret = PASS; + if (conn-last_query_type == QUERY_UPSERT conn-upsert_status.affected_rows) { + MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn-stats, STAT_ROWS_AFFECTED_NORMAL, conn-upsert_status.affected_rows); + } } - CONN_SET_STATE(conn, CONN_QUERY_SENT); - /* - Here read the result set. We don't do it in simple_command because it need - information from the ok packet. We will fetch it ourselves. - */ - ret = conn-m-query_read_result_set_header(conn, NULL TSRMLS_CC); - if (ret == PASS conn-last_query_type == QUERY_UPSERT conn-upsert_status.affected_rows) { - MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn-stats, STAT_ROWS_AFFECTED_NORMAL, conn-upsert_status.affected_rows); - } - DBG_RETURN(ret); } /* }}} */ @@ -931,7 +924,9 @@ ret = conn-m-simple_command(conn, COM_QUERY, query, query_len, PROT_LAST /* we will handle the OK packet*/, FALSE, FALSE TSRMLS_CC); - CONN_SET_STATE(conn, CONN_QUERY_SENT); + if (PASS == ret) { + CONN_SET_STATE(conn, CONN_QUERY_SENT); + } DBG_RETURN(ret); } /* }}} */ @@ -950,6 +945,10 @@ DBG_ERR_FMT(Connection not opened, clear or has been closed. State=%u, state); DBG_RETURN(FAIL); } + /* + Here read the result set. We don't do it in simple_command because it need + information from the ok packet. We will fetch it ourselves. + */ DBG_RETURN(conn-m-query_read_result_set_header(conn, NULL TSRMLS_CC)); } /* }}} */ Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-05-31 19:04:52 UTC (rev 311675) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-05-31 20:42:44 UTC (rev 311676) @@ -996,25 +996,18 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND * conn, const char * query, unsigned int query_len TSRMLS_DC) { - enum_func_status ret; + enum_func_status ret = FAIL; DBG_ENTER(mysqlnd_conn::query); DBG_INF_FMT(conn=%llu query=%s, conn-thread_id, query); - if (PASS != conn-m-simple_command(conn, COM_QUERY, (zend_uchar *) query, query_len, - PROT_LAST /* we will handle the OK packet*/, - FALSE, FALSE TSRMLS_CC)) { - DBG_RETURN(FAIL); + if (PASS == conn-m-send_query(conn, query, query_len TSRMLS_CC) + PASS == conn-m-reap_query(conn TSRMLS_CC)) + { + ret = PASS; + if (conn-last_query_type == QUERY_UPSERT conn-upsert_status.affected_rows) { + MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn-stats, STAT_ROWS_AFFECTED_NORMAL, conn-upsert_status.affected_rows); + } } - CONN_SET_STATE(conn, CONN_QUERY_SENT); - /* - Here read the result set. We don't do it in simple_command because it need - information from the ok packet. We will fetch it ourselves. - */ - ret = conn-m-query_read_result_set_header(conn, NULL TSRMLS_CC); - if (ret == PASS conn-last_query_type ==
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/tests/ imageloadfont_error1.phpt imageloadfont_error2.phpt
rdohms Tue, 31 May 2011 21:10:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311677 Log: Adding testcases to validate imageloadfont input parameter validation, tests were developed at #tek11 testfest Changed paths: A php/php-src/trunk/ext/gd/tests/imageloadfont_error1.phpt A php/php-src/trunk/ext/gd/tests/imageloadfont_error2.phpt Added: php/php-src/trunk/ext/gd/tests/imageloadfont_error1.phpt === --- php/php-src/trunk/ext/gd/tests/imageloadfont_error1.phpt (rev 0) +++ php/php-src/trunk/ext/gd/tests/imageloadfont_error1.phpt2011-05-31 21:10:01 UTC (rev 311677) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on non-string first parameter +--CREDITS-- +Neveo Harrison neveoo [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont(array()) ); +? +--EXPECTF-- +Warning: imageloadfont() expects parameter 1 to be string, array given in %s on line %d +NULL \ No newline at end of file Added: php/php-src/trunk/ext/gd/tests/imageloadfont_error2.phpt === --- php/php-src/trunk/ext/gd/tests/imageloadfont_error2.phpt (rev 0) +++ php/php-src/trunk/ext/gd/tests/imageloadfont_error2.phpt2011-05-31 21:10:01 UTC (rev 311677) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on invalid file passed as first argument +--CREDITS-- +Austin Drouare austin.drouare [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont('\src\invalidfile.font') ); +? +--EXPECTF-- +Warning: imageloadfont(\src\invalidfile.font): failed to open stream: No such file or directory in %s on line %d +bool(false) -- 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/gd/tests/ imageloadfont_error1.phpt imageloadfont_error2.phpt
rdohms Tue, 31 May 2011 21:24:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311678 Log: Adding testcases to validate imageloadfont input parameter validation, tests were developed at #tek11 testfest Changed paths: A php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error1.phpt A php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error2.phpt Added: php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error1.phpt === --- php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error1.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error1.phpt 2011-05-31 21:24:10 UTC (rev 311678) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on non-string first parameter +--CREDITS-- +Neveo Harrison neveoo [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont(array()) ); +? +--EXPECTF-- +Warning: imageloadfont() expects parameter 1 to be string, array given in %s on line %d +NULL \ No newline at end of file Added: php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error2.phpt === --- php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error2.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/gd/tests/imageloadfont_error2.phpt 2011-05-31 21:24:10 UTC (rev 311678) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on invalid file passed as first argument +--CREDITS-- +Austin Drouare austin.drouare [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont('\src\invalidfile.font') ); +? +--EXPECTF-- +Warning: imageloadfont(\src\invalidfile.font): failed to open stream: No such file or directory in %s on line %d +bool(false) -- 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/gd/tests/ imageloadfont_error1.phpt imageloadfont_error2.phpt
rdohms Tue, 31 May 2011 21:38:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311679 Log: Adding testcases to validate imageloadfont input parameter validation, tests were developed at #tek11 testfest Changed paths: A php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error1.phpt A php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error2.phpt Added: php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error1.phpt === --- php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error1.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error1.phpt 2011-05-31 21:38:23 UTC (rev 311679) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on non-string first parameter +--CREDITS-- +Neveo Harrison neveoo [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont(array()) ); +? +--EXPECTF-- +Warning: imageloadfont() expects parameter 1 to be string, array given in %s on line %d +NULL \ No newline at end of file Added: php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error2.phpt === --- php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error2.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/gd/tests/imageloadfont_error2.phpt 2011-05-31 21:38:23 UTC (rev 311679) @@ -0,0 +1,15 @@ +--TEST-- +Testing that imageloadfont() breaks on invalid file passed as first argument +--CREDITS-- +Austin Drouare austin.drouare [at] gmail [dot] com #testfest #tek11 +--SKIPIF-- +?php + if (!extension_loaded(gd)) die(skip GD not present); +? +--FILE-- +?php +var_dump( imageloadfont('\src\invalidfile.font') ); +? +--EXPECTF-- +Warning: imageloadfont(\src\invalidfile.font): failed to open stream: No such file or directory in %s on line %d +bool(false) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/litespeed/ lsapi_main.c
gwangTue, 31 May 2011 22:40:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311680 Log: fix CLI mode timeout Changed paths: U php/php-src/branches/PHP_5_3/sapi/litespeed/lsapi_main.c Modified: php/php-src/branches/PHP_5_3/sapi/litespeed/lsapi_main.c === --- php/php-src/branches/PHP_5_3/sapi/litespeed/lsapi_main.c2011-05-31 21:38:23 UTC (rev 311679) +++ php/php-src/branches/PHP_5_3/sapi/litespeed/lsapi_main.c2011-05-31 22:40:42 UTC (rev 311680) @@ -660,6 +660,7 @@ implicit_flush, 1, output_buffering, 0, max_execution_time, 0, +max_input_time, -1, NULL }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/Zend/ tests/bug54910.phpt zend_API.c
dmitry Tue, 31 May 2011 11:36:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311653 Log: MFH: Fixed bug #54910 (Crash when calling call_user_func with unknown function name) Bug: http://bugs.php.net/54910 (Closed) Crash when calling call_user_func with unknown function name Changed paths: A php/php-src/branches/PHP_5_4/Zend/tests/bug54910.phpt U php/php-src/branches/PHP_5_4/Zend/zend_API.c Added: php/php-src/branches/PHP_5_4/Zend/tests/bug54910.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug54910.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug54910.phpt 2011-05-31 11:36:57 UTC (rev 311653) @@ -0,0 +1,28 @@ +--TEST-- +Bug #54910 (Crash when calling call_user_func with unknown function name) +--FILE-- +?php +class A { +public function __call($method, $args) { +if (stripos($method, 'get') === 0) { +return $this-get(); +} +die(No such method - '$method'\n); +} + +protected function get() { +$class = get_class($this); +$call = array($class, 'noSuchMethod'); + +if (is_callable($call)) { +call_user_func($call); +} +} +} + +class B extends A {} + +$input = new B(); +echo $input-getEmail(); +--EXPECT-- +No such method - 'noSuchMethod' Modified: php/php-src/branches/PHP_5_4/Zend/zend_API.c === --- php/php-src/branches/PHP_5_4/Zend/zend_API.c2011-05-31 11:28:37 UTC (rev 311652) +++ php/php-src/branches/PHP_5_4/Zend/zend_API.c2011-05-31 11:36:57 UTC (rev 311653) @@ -2773,6 +2773,11 @@ if (fcc-function_handler) { retval = 1; call_via_handler = (fcc-function_handler-common.fn_flags ZEND_ACC_CALL_VIA_HANDLER) != 0; + if (call_via_handler !fcc-object_ptr EG(This) + Z_OBJ_HT_P(EG(This))-get_class_entry + instanceof_function(Z_OBJCE_P(EG(This)), fcc-calling_scope TSRMLS_CC)) { + fcc-object_ptr = EG(This); + } } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php