Changeset 1238


Ignore:
Timestamp:
2013-05-10T19:52:02+02:00 (15 months ago)
Author:
moo
Message:

fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when xcache enabled

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1235 r1238  
    1010 * fixes #303: tablesort.js not found in Diagnosis and Coverager 
    1111 * fixes #297: segv on startup under sparc, ini setting overflow 
     12 * fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use 
    1213 
    13143.0.1 2013-01-11 
  • trunk/NEWS

    r1234 r1238  
    77======== 
    88 * bug fixes 
     9 * "cannot redeclare class" errors is now gone. Can also be avoid by using readonly_protection (unavailable with /dev/zero). 
    910 
    10113.0.1 2013-01-11 
  • trunk/mod_cacher/xc_cache.h

    r1201 r1238  
    194194    zend_arg_info *arg_info; 
    195195#endif 
     196#ifdef ZEND_ENGINE_2_4 
     197    zend_literal *literals; 
     198#endif 
    196199    zend_op *opcodes; 
    197200} xc_gc_op_array_t; 
  • trunk/mod_cacher/xc_cacher.c

    r1234 r1238  
    22922292        efree(op_array->opcodes); 
    22932293    } 
     2294#ifdef ZEND_ENGINE_2_4 
     2295    if (op_array->literals) { 
     2296        efree(op_array->literals); 
     2297    } 
     2298#endif 
    22942299} 
    22952300/* }}} */ 
  • trunk/processor/processor.m4

    r1232 r1238  
    728728        zend_bool gc_arg_info = 0; 
    729729        zend_bool gc_opcodes  = 0; 
     730#ifdef ZEND_ENGINE_2_4 
     731        zend_bool gc_literals = 0; 
     732#endif 
    730733        /* really fast shallow copy */ 
    731734        memcpy(dst, src, sizeof(src[0])); 
     
    744747        dst->filename = processor->entry_php_src->filepath; 
    745748#ifdef ZEND_ENGINE_2_4 
    746         if (src->literals /* || op_array_info->literalsinfo_cnt */) { 
     749        if (src->literals) { 
    747750            gc_opcodes = 1; 
     751            if (op_array_info->literalinfo_cnt) { 
     752                gc_literals = 1; 
     753            } 
    748754        } 
    749755#else 
    750756        if (op_array_info->oplineinfo_cnt) { 
    751757            gc_opcodes = 1; 
     758        } 
     759#endif 
     760#ifdef ZEND_ENGINE_2_4 
     761        if (gc_literals) { 
     762            dnl used when copying opcodes 
     763            COPY_N_EX(last_literal, zend_literal, literals) 
    752764        } 
    753765#endif 
     
    801813            } 
    802814        } 
    803         if (gc_arg_info || gc_opcodes) { 
     815        if (gc_arg_info || gc_opcodes || gc_literals) { 
    804816            xc_gc_op_array_t gc_op_array; 
    805817#ifdef ZEND_ENGINE_2 
     
    808820#endif 
    809821            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL; 
     822#ifdef ZEND_ENGINE_2_4 
     823            gc_op_array.literals = gc_literals ? dst->literals : NULL; 
     824#endif 
    810825            xc_gc_add_op_array(&gc_op_array TSRMLS_CC); 
    811826        } 
Note: See TracChangeset for help on using the changeset viewer.