com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/xml/tests/bug72085.phpt ext/xml/xml.c

From: Date: Tue, 16 Aug 2016 23:22:11 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/xml/tests/bug72085.phpt ext/xml/xml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93812@lists.php.net to get a copy of this message
Commit: 6202b47e63dabe1434722c275925c23029deac8d Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 17 Aug 2016 01:14:12 +0200 Parents: 20f76efb78b1fbe7b9af505ce2995436516e473a 1bb92d52121cf2635df163911216bf2958db4d34 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6202b47e63dabe1434722c275925c23029deac8d Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS AM ext/xml/tests/bug72085.phpt MM ext/xml/xml..c Diff: diff --cc NEWS index d17a936,30a17c1..e9c1b73 --- a/NEWS +++ b/NEWS @@@ -31,39 -21,19 +31,41 @@@ PH specifying a sequence). (Pablo Santiago Sánchez, Matteo) . Fixed bug #72759 (Regression in pgo_pgsql). (Anatol) +- Reflection: + . Fixed bug #72846 (getConstant for a array constant with constant values + returns NULL/NFC/UKNOWN). (Laruence) + +- Session: + . Fixed bug #72724 (PHP7: session-uploadprogress kills httpd). (Nikita) + - Standard: - . Fixed bug #72823 (strtr out-of-bound access). (cmb) + . Fixed bug #55451 (substr_compare NULL length interpreted as 0). (Lauri + Kenttä) . Fixed bug #72278 (getimagesize returning FALSE on valid jpg). (cmb) +- Streams: + . Fixed bug #72764 (ftps:// opendir wrapper data channel encryption fails + with IIS FTP 7.5, 8.5). (vhuk) + + - XML: + . Fixed bug #72085 (SEGV on unknown address zif_xml_parse). (cmb) -18 Aug 2016, PHP 5.6.25 +?? ??? 2016 PHP 7.0.10 - Core: + . Fixed bug #72629 (Caught exception assignment to variables ignores + references). (Laruence) + . Fixed bug #72594 (Calling an earlier instance of an included anonymous + class fatals).. (Laruence) . Fixed bug #72581 (previous property undefined in Exception after deserialization). (Laruence) + . Fixed bug #72496 (Cannot declare public method with signature incompatible + with parent private method). (Pedro Magalhães) . Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net) + . Fixed bug #71911 (Unable to set --enable-debug on building extensions by + phpize on Windows). (Yuji Uchiyama) + . Fixed bug causing ClosedGeneratorException being thrown into the calling + code instead of the Generator yielding from. (Bob) . Implemented FR #72614 (Support "nmake test" on building extensions by phpize). (Yuji Uchiyama) . Fixed bug #72641 (phpize (on Windows) ignores PHP_PREFIX). diff --cc ext/xml/tests/bug72085.phpt index 0000000,2989289..44ae1f1 mode 000000,100644..100644 --- a/ext/xml/tests/bug72085.phpt +++ b/ext/xml/tests/bug72085.phpt @@@ -1,0 -1,74 +1,74 @@@ + --TEST-- + Bug #72085 (SEGV on unknown address zif_xml_parse) + --SKIPIF-- + <?php + if (!extension_loaded('xml')) die('skip xml extension not available'); + ?> + --FILE-- + <?php + $var1 = xml_parser_create_ns(); + xml_set_element_handler($var1, new Exception(""), 4096); + xml_parse($var1, str_repeat("<a>", 10)); + ?> + ===DONE=== + --EXPECTF-- -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + -Warning: Invalid callback exception 'Exception' in %s%ebug72085.php:%d ++Warning: Invalid callback Exception in %s%ebug72085.php:%d + Stack trace: + #0 {main}, no array or string given in %s%ebug72085.php on line %d + + Warning: xml_parse(): Unable to call handler in %s%ebug72085.php on line %d + ===DONE=== diff --cc ext/xml/xml.c index d788b9b,9eba47b..aabb414 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@@ -493,24 -528,38 +493,25 @@@ static void xml_call_handler(xml_parse fci.no_separation = 0; /*fci.function_handler_cache = &function_ptr;*/ - result = zend_call_function(&fci, NULL TSRMLS_CC); + result = zend_call_function(&fci, NULL); if (result == FAILURE) { - zval **method; - zval **obj; + zval *method; + zval *obj; if (Z_TYPE_P(handler) == IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(handler)); + php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(handler)); - } else if ((obj = zend_hash_index_find(Z_ARRVAL_P(handler), 0)) != NULL && + } else if (Z_TYPE_P(handler) == IS_ARRAY && - zend_hash_index_find(Z_ARRVAL_P(handler), 0, (void **) &obj) == SUCCESS && - zend_hash_index_find(Z_ARRVAL_P(handler), 1, (void **) &method) == SUCCESS && - Z_TYPE_PP(obj) == IS_OBJECT && - Z_TYPE_PP(method) == IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s::%s()", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method)); - } else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler"); - } - - for (i = 0; i < argc; i++) { - zval_ptr_dtor(args[i]); ++ (obj = zend_hash_index_find(Z_ARRVAL_P(handler), 0)) != NULL && + (method = zend_hash_index_find(Z_ARRVAL_P(handler), 1)) != NULL && + Z_TYPE_P(obj) == IS_OBJECT && + Z_TYPE_P(method) == IS_STRING) { + php_error_docref(NULL, E_WARNING, "Unable to call handler %s::%s()", ZSTR_VAL(Z_OBJCE_P(obj)->name), Z_STRVAL_P(method)); + } else + php_error_docref(NULL, E_WARNING, "Unable to call handler"); } - efree(args); - - if (result == FAILURE) { - return NULL; - } else { - return EG(exception) ? NULL : retval; - } - } else { - for (i = 0; i < argc; i++) { - zval_ptr_dtor(&argv[i]); - } - return NULL; + } + for (i = 0; i < argc; i++) { + zval_ptr_dtor(&argv[i]); } } /* }}} */

« previous php.cvs (#93812) next »