cvs: ZendEngine2(PHP_5_3) / zend_compile.c zend_compile.h /tests bug44414.phpt php-src NEWS
[email protected] ("Dmitry Stogov")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsdmitry1205315202@cvsserver> |
dmitry Wed Mar 12 09:46:42 2008 UTC
Added files: (Branch: PHP_5_3)
/ZendEngine2/tests bug44414.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_compile.c zend_compile.h
Log:
Fixed bug #44414 (Incomplete reporting about abstract methods)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.135&r2=1.2027.2.547.2.965.2.136&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.135 php-src/NEWS:1.2027.2.547.2.965.2.136
--- php-src/NEWS:1.2027.2.547.2.965.2.135 Wed Mar 12 02:40:56 2008
+++ php-src/NEWS Wed Mar 12 09:46:41 2008
@@ -126,6 +126,7 @@
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
- Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
+- Fixed bug #44414 (Incomplete reporting about abstract methods). (Dmitry)
- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
(frode at coretrek dot com, Nuno)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.46&r2=1.647.2.27.2.41.2.47&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.46 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.47
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.46 Mon Mar 3 15:07:04 2008
+++ ZendEngine2/zend_compile.c Wed Mar 12 09:46:41 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.46 2008/03/03 15:07:04 robinf Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.47 2008/03/12 09:46:41 dmitry Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -2588,7 +2588,8 @@
if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS && ce->type == ZEND_INTERNAL_CLASS) {
ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
- } else {
+ } else if (!(ce->ce_flags & ZEND_ACC_IMPLEMENT_INTERFACES)) {
+ /* The verification will be done in runtime by ZEND_VERIFY_ABSTRACT_CLASS */
zend_verify_abstract_class(ce TSRMLS_CC);
}
}
@@ -2700,7 +2701,7 @@
}
return NULL;
} else {
- if (!(ce->ce_flags & ZEND_ACC_INTERFACE)) {
+ if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES))) {
zend_verify_abstract_class(ce TSRMLS_CC);
}
return ce;
@@ -3246,10 +3247,13 @@
}
}
/* Inherit interfaces; reset number to zero, we need it for above check and
- * will restore it during actual implementation. */
+ * will restore it during actual implementation.
+ * The ZEND_ACC_IMPLEMENT_INTERFACES flag disables double call to
+ * zend_verify_abstract_class() */
if (ce->num_interfaces > 0) {
ce->interfaces = NULL;
ce->num_interfaces = 0;
+ ce->ce_flags |= ZEND_ACC_IMPLEMENT_INTERFACES;
}
CG(active_class_entry) = NULL;
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.316.2.8.2.12.2.14&r2=1.316.2.8.2.12.2.15&diff_format=u
Index: ZendEngine2/zend_compile.h
diff -u ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.14 ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.15
--- ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.14 Tue Feb 12 00:20:33 2008
+++ ZendEngine2/zend_compile.h Wed Mar 12 09:46:42 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.14 2008/02/12 00:20:33 stas Exp $ */
+/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.15 2008/03/12 09:46:42 dmitry Exp $ */
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
@@ -143,6 +143,10 @@
/* deprecation flag */
#define ZEND_ACC_DEPRECATED 0x40000
+/* class implement interface(s) flag */
+#define ZEND_ACC_IMPLEMENT_INTERFACES 0x80000
+
+
char *zend_visibility_string(zend_uint fn_flags);
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug44414.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug44414.phpt
+++ ZendEngine2/tests/bug44414.phpt