Changeset 836


Ignore:
Timestamp:
2012-03-25T03:59:20+02:00 (3 years ago)
Author:
moo
Message:

fill uninitialized with line number for debugging purpose

Location:
trunk/processor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/head.m4

    r825 r836  
    3131define(`SIZEOF_zval_ptr_nullable', `sizeof(zval_ptr_nullable)')
    3232define(`COUNTOF_zval_ptr_nullable', `1')
     33define(`SIZEOF_zend_trait_alias_ptr', `sizeof(zend_trait_alias)')
     34define(`COUNTOF_zend_trait_alias_ptr', `1')
     35define(`SIZEOF_zend_trait_precedence_ptr', `sizeof(zend_trait_precedence)')
     36define(`COUNTOF_zend_trait_precedence_ptr', `1')
    3337define(`SIZEOF_xc_entry_name_t', `sizeof(xc_entry_name_t)')
    3438define(`COUNTOF_xc_entry_name_t', `1')
     
    5256typedef zval *zval_ptr;
    5357typedef zval *zval_ptr_nullable;
     58#ifdef ZEND_ENGINE_2_4
     59typedef zend_trait_alias *zend_trait_alias_ptr;
     60typedef zend_trait_precedence *zend_trait_precedence_ptr;
     61#endif
     62
    5463typedef zend_uchar zval_data_type;
    5564#ifdef IS_UNICODE
     
    92101};
    93102/* }}} */
     103/* {{{ memsetptr */
     104IFASSERT(`dnl
     105static void *memsetptr(void *mem, void *content, size_t n)
     106{
     107    void **p = (void **) mem;
     108    void **end = (char *) mem + n;
     109    while (p < end) {
     110        *p = content;
     111        p += sizeof(content);
     112    }
     113    return mem;
     114}
     115')
     116/* }}} */
    94117#ifdef HAVE_XCACHE_DPRINT
    95118static void xc_dprint_indent(int indent) /* {{{ */
     
    315338/* {{{ field name checker */
    316339IFASSERT(`dnl
    317 int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, int assert_names_count, HashTable *done_names)
     340static int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, int assert_names_count, HashTable *done_names)
    318341{
    319342    int errors = 0;
  • trunk/processor/main.m4

    r794 r836  
    5656        $1 = (FORCETYPE *) (processor->p = (char *) ALIGN(processor->p));
    5757        ifelse(`$4', `', `
    58                 IFASSERT(`memset($1, -1, SIZE);')
     58                IFASSERT(`memsetptr($1, (void *) __LINE__, SIZE);')
    5959            ', `
    6060                memset($1, 0, SIZE);
     
    7373                FORCETYPE*COUNT, `HashTable*1', `ALLOC_HASHTABLE($1);',
    7474                `', `', `$1 = (FORCETYPE *) emalloc(SIZE);')
    75             IFASSERT(`memset($1, -1, SIZE);')
     75            IFASSERT(`memsetptr($1, (void *) __LINE__, SIZE);')
    7676        ', `
    7777            $1 = (FORCETYPE *) ecalloc(COUNT, sizeof($2));
Note: See TracChangeset for help on using the changeset viewer.