]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.4' into PHP-5.5
authorDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2013 19:59:00 +0000 (23:59 +0400)
committerDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2013 19:59:00 +0000 (23:59 +0400)
* PHP-5.4:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.

Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

1  2 
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index 42a9c747372d5fbbb9b53cf0ccfc25b86230fcb1,eed65e3e27a6a0a0feb4a3a2d1d1a5d733b76006..386641a620a9fd176ff287da965e6f145e17d5c8
@@@ -3168,7 -3140,9 +3168,9 @@@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|
                ZEND_VM_NEXT_OPCODE();
        }
  
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
 -          !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
++          !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
                ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
        }
  
index 23c89d1258db5b49a1d77239c689e6a3c0e07532,18b3f4772c84aba1b9136cd6acd4e013dfef5fae..916a6ffe5c5444b06b1db74185aaf38ca92b86e8
@@@ -13089,7 -11171,9 +13089,9 @@@ static int ZEND_FASTCALL  ZEND_SEND_REF
                ZEND_VM_NEXT_OPCODE();
        }
  
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
 -          !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
++          !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
                return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
  
@@@ -30710,7 -27125,9 +30712,9 @@@ static int ZEND_FASTCALL  ZEND_SEND_REF
                ZEND_VM_NEXT_OPCODE();
        }
  
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
 -          !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
++          !ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.opline_num)) {
                return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }