]> granicus.if.org Git - php/commitdiff
Merge remote-tracking branch 'origin/master' into phpng
authorXinchen Hui <laruence@php.net>
Fri, 18 Jul 2014 07:52:52 +0000 (15:52 +0800)
committerXinchen Hui <laruence@php.net>
Fri, 18 Jul 2014 08:25:43 +0000 (16:25 +0800)
Conflicts:
Zend/zend_compile.h
ext/openssl/xp_ssl.c

1  2 
Zend/zend_compile.h
Zend/zend_opcode.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/php_date.c
ext/mysqli/mysqli.c
ext/mysqlnd/mysqlnd.c
ext/mysqlnd/mysqlnd_net.c
ext/openssl/xp_ssl.c
main/rfc1867.c

index 3124c35208e69de31e512c50bb6d952c505a641a,b4ecf6f51db7510da2eb4b633abf6f9e906d381b..a838a5814466edb696fc08d7ace0db058e71b98e
@@@ -840,10 -864,9 +840,13 @@@ int zend_add_literal(zend_op_array *op_
  #define ZEND_FAST_RET_TO_CATCH                1
  #define ZEND_FAST_RET_TO_FINALLY      2
  
+ #define ZEND_FAST_CALL_FOR_CATCH      1
+ #define ZEND_FAST_CALL_FOR_FINALLY    2
 +#define ZEND_ARRAY_ELEMENT_REF                (1<<0)
 +#define ZEND_ARRAY_NOT_PACKED         (1<<1)
 +#define ZEND_ARRAY_SIZE_SHIFT         2
 +
  END_EXTERN_C()
  
  #define ZEND_CLONE_FUNC_NAME          "__clone"
Simple merge
index b9c45fe0ed9ba1100ecf8b1ca9ae508d30cc8057,c3ca1c1c8fd1dc0ed6c651a9c0afd42712f920ba..618f90267fca0921e9ee1edf9a3fe8b0a24d5d09
@@@ -5757,13 -5625,13 +5757,13 @@@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, AN
  {
        USE_OPLINE
  
-       if (opline->extended_value &&
+       if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) &&
            UNEXPECTED(EG(prev_exception) != NULL)) {
            /* in case of unhandled exception jump to catch block instead of finally */
 -              ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
 +              ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
                ZEND_VM_CONTINUE();
        }
-       EX(fast_ret) = opline + 1;
+       EX(fast_ret) = opline;
        EX(delayed_exception) = NULL;
        ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
        ZEND_VM_CONTINUE();
  ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, ANY)
  {
        if (EX(fast_ret)) {
-               ZEND_VM_SET_OPCODE(EX(fast_ret));
+               ZEND_VM_SET_OPCODE(EX(fast_ret) + 1);
+               if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) {
 -                      EX(fast_ret) = &EX(op_array)->opcodes[EX(fast_ret)->op2.opline_num];
++                      EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num];
+               }
                ZEND_VM_CONTINUE();
        } else {
                /* special case for unhandled exceptions */
index 214ab51bebde9df8c8dae7778e401cbf30ca745c,4f47bb1e9fb0a8dfce94d7bc3f3d26ba8cd9dab1..c6c8f8ee38a73c2a78d9b74a835aef16af46cde6
@@@ -1466,13 -1344,13 +1466,13 @@@ static int ZEND_FASTCALL  ZEND_FAST_CAL
  {
        USE_OPLINE
  
-       if (opline->extended_value &&
+       if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) &&
            UNEXPECTED(EG(prev_exception) != NULL)) {
            /* in case of unhandled exception jump to catch block instead of finally */
 -              ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
 +              ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
                ZEND_VM_CONTINUE();
        }
-       EX(fast_ret) = opline + 1;
+       EX(fast_ret) = opline;
        EX(delayed_exception) = NULL;
        ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
        ZEND_VM_CONTINUE();
  static int ZEND_FASTCALL  ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
  {
        if (EX(fast_ret)) {
-               ZEND_VM_SET_OPCODE(EX(fast_ret));
+               ZEND_VM_SET_OPCODE(EX(fast_ret) + 1);
+               if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) {
 -                      EX(fast_ret) = &EX(op_array)->opcodes[EX(fast_ret)->op2.opline_num];
++                      EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num];
+               }
                ZEND_VM_CONTINUE();
        } else {
                /* special case for unhandled exceptions */
Simple merge
Simple merge
Simple merge
Simple merge
index 587de6c52598196818568d040ad5aa80a47d836e,9fbbb6de56baff75a901e40088a00f20367ec179..bf72fed434495181464851acd59ac2f4cbeb44d2
@@@ -1157,12 -1166,14 +1157,13 @@@ static int set_server_specific_opts(php
                ssl_ctx_options |= SSL_OP_SINGLE_DH_USE;
        }
  
 -      if (SUCCESS == php_stream_context_get_option(
 -                              stream->context, "ssl", "single_ecdh_use", &val) &&
 -                      zend_is_true(*val TSRMLS_CC)
 -      ) {
+ #ifdef HAVE_ECDH
-                       zend_is_true(val TSRMLS_CC)
-       ) {
 +      if (NULL != (val = php_stream_context_get_option(
 +                              stream->context, "ssl", "single_ecdh_use")) &&
++                      zend_is_true(val TSRMLS_CC)) {
                ssl_ctx_options |= SSL_OP_SINGLE_ECDH_USE;
        }
+ #endif
  
        SSL_CTX_set_options(ctx, ssl_ctx_options);
  
diff --cc main/rfc1867.c
Simple merge