]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorXinchen Hui <laruence@gmail.com>
Fri, 12 Aug 2016 08:35:41 +0000 (16:35 +0800)
committerXinchen Hui <laruence@gmail.com>
Fri, 12 Aug 2016 08:35:41 +0000 (16:35 +0800)
* PHP-7.0:
  Fixed bug #72813 (Segfault with __get returned by ref)
  Fix URL rewriter partially

Conflicts:
Zend/zend_object_handlers.c
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re

1  2 
Zend/zend_object_handlers.c
ext/standard/url_scanner_ex.c

index 86e71e30a227565672f9907a64dba74867ffc509,70dab660b3c4fa34451b33a6bf81b456c4817b11..434102035c37269eac06abef2d7998336effa67e
@@@ -200,13 -197,7 +200,9 @@@ static void zend_std_call_getter(zval *
  
           it should return whether the call was successful or not
        */
-       if (Z_REFCOUNTED_P(member)) Z_ADDREF_P(member);
        zend_call_method_with_1_params(object, ce, &ce->__get, ZEND_GET_FUNC_NAME, retval, member);
-       zval_ptr_dtor(member);
 +
 +      EG(fake_scope) = orig_fake_scope;
  }
  /* }}} */
  
@@@ -215,13 -206,7 +211,10 @@@ static int zend_std_call_setter(zval *o
        zval retval;
        int result;
        zend_class_entry *ce = Z_OBJCE_P(object);
 +      zend_class_entry *orig_fake_scope = EG(fake_scope);
 +
 +      EG(fake_scope) = NULL;
  
-       if (Z_REFCOUNTED_P(member)) Z_ADDREF_P(member);
-       if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
        /* __set handler is called with two arguments:
             property name
             value to be set
index 04a55e22cd7a0481e61bb665e5cbd4695f939af3,5db9c6d9358c63cc823824a3ae6bf010efd25f89..880332ead709c34e708ab7a18ddf82c8b51bd4b5
@@@ -1,4 -1,4 +1,4 @@@
--/* Generated by re2c 0.14.3 */
++/* Generated by re2c 0.13.5 */
  #line 1 "ext/standard/url_scanner_ex.re"
  /*
    +----------------------------------------------------------------------+
@@@ -1014,34 -901,34 +1014,34 @@@ yy59
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
 -yy71:
 +yy60:
        if (yybm[0+yych] & 64) {
 -              goto yy70;
 +              goto yy59;
        }
-       if (yych <= '\'') goto yy62;
 -      if (yych <= '\'') goto yy73;
 -yy72:
++      if (yych <= '=') goto yy62;
 +yy61:
        YYCURSOR = YYMARKER;
 -      goto yy63;
 -yy73:
 +      goto yy52;
 +yy62:
        ++YYCURSOR;
 -#line 381 "ext/standard/url_scanner_ex.re"
 +#line 560 "ext/standard/url_scanner_ex.re"
        { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
 -#line 917 "ext/standard/url_scanner_ex.c"
 -yy75:
 +#line 1030 "ext/standard/url_scanner_ex.c"
 +yy64:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
 -yy76:
 +yy65:
        if (yybm[0+yych] & 128) {
 -              goto yy75;
 +              goto yy64;
        }
-       if (yych >= '#') goto yy61;
 -      if (yych >= '#') goto yy72;
++      if (yych >= '>') goto yy61;
        ++YYCURSOR;
 -#line 380 "ext/standard/url_scanner_ex.re"
 +#line 559 "ext/standard/url_scanner_ex.re"
        { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
 -#line 930 "ext/standard/url_scanner_ex.c"
 +#line 1043 "ext/standard/url_scanner_ex.c"
  }
 -#line 384 "ext/standard/url_scanner_ex.re"
 +#line 563 "ext/standard/url_scanner_ex.re"
  
  
  stop: