Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

laruence Jul 4th, 2016 156 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
  2. index cda98fd..de9f3ed 100644
  3. --- a/Zend/zend_execute.c
  4. +++ b/Zend/zend_execute.c
  5. @@ -1561,6 +1561,8 @@ num_index:
  6.                     retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
  7.                     break;
  8.             }
  9. +       } else if (type == BP_VAR_R && UNEXPECTED(Z_ISREF_P(retval))) {
  10. +           retval = Z_REFVAL_P(retval);
  11.         }
  12.     } else if (EXPECTED(Z_TYPE_P(dim) == IS_STRING)) {
  13.         offset_key = Z_STR_P(dim);
  14. @@ -1591,7 +1593,11 @@ str_index:
  15.                             ZVAL_NULL(retval);
  16.                             break;
  17.                     }
  18. +               } else if (type == BP_VAR_R && UNEXPECTED(Z_ISREF_P(retval))) {
  19. +                   retval = Z_REFVAL_P(retval);
  20.                 }
  21. +           } else if (type == BP_VAR_R && UNEXPECTED(Z_ISREF_P(retval))) {
  22. +               retval = Z_REFVAL_P(retval);
  23.             }
  24.         } else {
  25.             switch (type) {
  26. diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
  27. index 83e74bc..75b3c98 100644
  28. --- a/Zend/zend_vm_def.h
  29. +++ b/Zend/zend_vm_def.h
  30. @@ -4868,14 +4868,6 @@ ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
  31.     SAVE_OPLINE();
  32.     if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  33.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  34. -   } else if ((OP1_TYPE & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  35. -       /* Don't keep lock on reference, lock the value instead */
  36. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  37. -           ZVAL_UNREF(op1);
  38. -       } else {
  39. -           Z_DELREF_P(op1);
  40. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  41. -       }
  42.     }
  43.     if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  44.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  45. diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
  46. index 174c6de..8f534a3 100644
  47. --- a/Zend/zend_vm_execute.h
  48. +++ b/Zend/zend_vm_execute.h
  49. @@ -5851,14 +5851,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(
  50.     SAVE_OPLINE();
  51.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  52.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  53. -   } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  54. -       /* Don't keep lock on reference, lock the value instead */
  55. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  56. -           ZVAL_UNREF(op1);
  57. -       } else {
  58. -           Z_DELREF_P(op1);
  59. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  60. -       }
  61.     }
  62.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  63.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  64. @@ -9647,14 +9639,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEN
  65.     SAVE_OPLINE();
  66.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  67.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  68. -   } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  69. -       /* Don't keep lock on reference, lock the value instead */
  70. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  71. -           ZVAL_UNREF(op1);
  72. -       } else {
  73. -           Z_DELREF_P(op1);
  74. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  75. -       }
  76.     }
  77.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  78.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  79. @@ -11421,14 +11405,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER
  80.     SAVE_OPLINE();
  81.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  82.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  83. -   } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  84. -       /* Don't keep lock on reference, lock the value instead */
  85. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  86. -           ZVAL_UNREF(op1);
  87. -       } else {
  88. -           Z_DELREF_P(op1);
  89. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  90. -       }
  91.     }
  92.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  93.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  94. @@ -32195,14 +32171,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEN
  95.     SAVE_OPLINE();
  96.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  97.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  98. -   } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  99. -       /* Don't keep lock on reference, lock the value instead */
  100. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  101. -           ZVAL_UNREF(op1);
  102. -       } else {
  103. -           Z_DELREF_P(op1);
  104. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  105. -       }
  106.     }
  107.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  108.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  109. @@ -37291,14 +37259,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_O
  110.     SAVE_OPLINE();
  111.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  112.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  113. -   } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  114. -       /* Don't keep lock on reference, lock the value instead */
  115. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  116. -           ZVAL_UNREF(op1);
  117. -       } else {
  118. -           Z_DELREF_P(op1);
  119. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  120. -       }
  121.     }
  122.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  123.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  124. @@ -39884,14 +39844,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMPVAR_HANDLER(ZE
  125.     SAVE_OPLINE();
  126.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  127.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  128. -   } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  129. -       /* Don't keep lock on reference, lock the value instead */
  130. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  131. -           ZVAL_UNREF(op1);
  132. -       } else {
  133. -           Z_DELREF_P(op1);
  134. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  135. -       }
  136.     }
  137.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  138.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  139. @@ -42119,14 +42071,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER
  140.     SAVE_OPLINE();
  141.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  142.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  143. -   } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  144. -       /* Don't keep lock on reference, lock the value instead */
  145. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  146. -           ZVAL_UNREF(op1);
  147. -       } else {
  148. -           Z_DELREF_P(op1);
  149. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  150. -       }
  151.     }
  152.     if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  153.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  154. @@ -44267,14 +44211,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CV_HANDLER(ZE
  155.     SAVE_OPLINE();
  156.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  157.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  158. -   } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  159. -       /* Don't keep lock on reference, lock the value instead */
  160. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  161. -           ZVAL_UNREF(op1);
  162. -       } else {
  163. -           Z_DELREF_P(op1);
  164. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  165. -       }
  166.     }
  167.     if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  168.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
  169. @@ -45414,14 +45350,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLE
  170.     SAVE_OPLINE();
  171.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
  172.         op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
  173. -   } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
  174. -       /* Don't keep lock on reference, lock the value instead */
  175. -       if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
  176. -           ZVAL_UNREF(op1);
  177. -       } else {
  178. -           Z_DELREF_P(op1);
  179. -           ZVAL_COPY(op1, Z_REFVAL_P(op1));
  180. -       }
  181.     }
  182.     if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
  183.         op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top