Changeset 1516 in svn


Ignore:
Timestamp:
2014-09-08T09:46:36Z (3 years ago)
Author:
Xuefer
Message:

MFT: merge [1493],[1496] from trunk, fix leak in decompiler/disassembler

Location:
branches/3.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2

    • Property svn:mergeinfo changed
      /trunkmerged: 1493
  • branches/3.2/xcache.c

    r1515 r1516  
    339339    switch ((Z_TYPE_P(value) & IS_CONSTANT_TYPE_MASK)) {
    340340    case IS_CONSTANT:
    341         *return_value = *value;
    342         zval_copy_ctor(return_value);
     341        MAKE_COPY_ZVAL(&value, return_value)
    343342        return_value->type = UNISW(IS_STRING, UG(unicode) ? IS_UNICODE : IS_STRING);
    344343        break;
     
    346345#ifdef IS_CONSTANT_ARRAY
    347346    case IS_CONSTANT_ARRAY:
    348         *return_value = *value;
    349         zval_copy_ctor(return_value);
     347        MAKE_COPY_ZVAL(&value, return_value)
    350348        return_value->type = IS_ARRAY;
    351349        break;
     
    360358    default:
    361359        if ((Z_TYPE_P(value) & ~IS_CONSTANT_TYPE_MASK)) {
    362             *return_value = *value;
    363             zval_copy_ctor(return_value);
     360            MAKE_COPY_ZVAL(&value, return_value);
    364361            return_value->type &= IS_CONSTANT_TYPE_MASK;
    365362        }
  • branches/3.2/xcache/xc_compatibility.h

    r1515 r1516  
    220220/* }}} */
    221221
     222#ifndef MAKE_COPY_ZVAL
     223#   define MAKE_COPY_ZVAL(ppzv, pzv) \
     224    *(pzv) = **(ppzv);            \
     225    zval_copy_ctor((pzv));        \
     226    INIT_PZVAL((pzv));
     227#endif
     228
    222229/* the class entry type to be stored in class_table */
    223230typedef ZESW(zend_class_entry, zend_class_entry*) xc_cest_t;
Note: See TracChangeset for help on using the changeset viewer.