summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2009-01-01 15:28:15 +0000
committerMarcus Boerger <helly@php.net>2009-01-01 15:28:15 +0000
commit41cc091141ead33cfe766bc56e7bae56c2bb5543 (patch)
treede96b8f1f826dc905b21c689181e3b2250a87ddc /Zend/zend_vm_execute.h
parent438c4cfacc32df4aab1a4f8e5ed43c7150b4118c (diff)
downloadphp-git-41cc091141ead33cfe766bc56e7bae56c2bb5543.tar.gz
- MFH Fix SEGV if get_method() returns a non bound function
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index d479f0dc1f..54ce1cdd87 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -5917,11 +5917,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCO
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -6381,11 +6381,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -6847,11 +6847,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -7405,11 +7405,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -10255,11 +10255,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCO
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -12086,11 +12086,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -13913,11 +13913,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -16348,11 +16348,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -17715,11 +17715,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_O
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -18845,11 +18845,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPC
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -19919,11 +19919,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPC
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -21263,11 +21263,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCO
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -24100,11 +24100,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCOD
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -25762,11 +25762,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -27476,11 +27476,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -29696,11 +29696,11 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_H
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
- EX(called_scope) = Z_OBJCE_P(EX(object));
-
- if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
+ if (!EX(object) || (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(called_scope) = NULL;
EX(object) = NULL;
} else {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {