Changeset 709


Ignore:
Timestamp:
2011-04-08T06:08:37+02:00 (4 years ago)
Author:
moo
Message:

disassembler: don't dump builtin functions

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r707 r709  
    12121.3.2 2011-??-?? 
    1313======== 
     14 * disassembler: don't dump builtin functions 
    1415 * fix win32 build against win32 native gnu tools 
    1516 * compatibility fix: fix segv on shutdown when ionCube Loader is loaded 
  • trunk/disassembler.c

    r504 r709  
    66#define return_value dst 
    77 
     8/* sandbox {{{ */ 
     9#undef TG 
     10#undef OG 
     11#define TG(x) (sandbox->tmp_##x) 
     12#define OG(x) (sandbox->orig_##x) 
     13/* }}} */ 
     14 
    815#ifndef HAVE_XCACHE_OPCODE_SPEC_DEF 
    916#error disassembler cannot be built without xcache/opcode_spec_def.h 
    1017#endif 
    11 static void xc_dasm(zval *dst, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 
     18static void xc_dasm(xc_sandbox_t *sandbox, zval *dst, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 
    1219{ 
    1320    Bucket *b; 
     
    3340    ALLOC_INIT_ZVAL(list); 
    3441    array_init(list); 
    35     xc_dasm_HashTable_zend_function(list, CG(function_table) TSRMLS_CC); 
     42    b = TG(internal_function_tail) ? TG(internal_function_tail)->pListNext : TG(function_table).pListHead; 
     43    for (; b; b = b->pListNext) { 
     44        ALLOC_INIT_ZVAL(zv); 
     45        array_init(zv); 
     46        xc_dasm_zend_function(zv, b->pData TSRMLS_CC); 
     47 
     48        add_u_assoc_zval_ex(list, BUCKET_KEY_TYPE(b), b->arKey, b->nKeyLength, zv); 
     49    } 
    3650    add_assoc_zval_ex(dst, ZEND_STRS("function_table"), list); 
    3751     
     
    3953    ALLOC_INIT_ZVAL(list); 
    4054    array_init(list); 
    41     for (b = CG(class_table)->pListHead; b; b = b->pListNext) { 
     55    b = TG(internal_class_tail) ? TG(internal_class_tail)->pListNext : TG(class_table).pListHead; 
     56    for (; b; b = b->pListNext) { 
    4257        ALLOC_INIT_ZVAL(zv); 
    4358        array_init(zv); 
     
    97112    } 
    98113 
    99     xc_dasm(dst, op_array TSRMLS_CC); 
     114    xc_dasm(&sandbox, dst, op_array TSRMLS_CC); 
    100115 
    101116    /* free */ 
     
    142157    } 
    143158 
    144     xc_dasm(dst, op_array TSRMLS_CC); 
     159    xc_dasm(&sandbox, dst, op_array TSRMLS_CC); 
    145160 
    146161    /* free */ 
Note: See TracChangeset for help on using the changeset viewer.