Branch: Tag:

2008-02-06

2008-02-06 12:38:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some more dmalloc stuff.

Rev: src/encode.c:1.252

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: encode.c,v 1.251 2008/02/02 21:39:44 grubba Exp $ + || $Id: encode.c,v 1.252 2008/02/06 12:38:17 grubba Exp $   */      #include "global.h"
437:    int e;    debug_malloc_touch(p);    if(p->flags & PROGRAM_FIXED) return; /* allow natural zapping */ +  debug_malloc_touch(p);    if(p->parent)    {    free_program(p->parent);
1004:    if(Pike_sp[-1].type == T_INT && Pike_sp[-1].subtype == NUMBER_UNDEFINED)    {    struct program *p=val->u.program; +  debug_malloc_touch(p);    pop_stack();    if( (p->flags & PROGRAM_HAS_C_METHODS) || p->event_handler )    {
1392:    * in the inherit. */    {    struct program *p2 = p->inherits[ref->inherit_offset].prog; +  debug_malloc_touch(p); +  debug_malloc_touch(p2);    int i;    for (i=0; i < p2->num_identifier_references; i++) {    struct reference *ref2 = p2->identifier_references + i;
2278:    if (!prog) {    Pike_error("Failed to decode object type.\n");    } +  debug_malloc_touch(prog);    push_object_type_backwards(flag, prog->id);    }    break;
2343:      static void cleanup_new_program_decode (int *orig_compilation_depth)   { +  debug_malloc_touch(Pike_compiler->new_program);    end_first_pass(0);    compilation_depth = *orig_compilation_depth;   }
2405:    int e;    ONERROR err;    +  debug_malloc_touch(p);    if ((string_no < 0) || (string_no >= p->num_strings)) {    Pike_error("Bad bytecode string number: %d (expected 0 - %d).\n",    string_no, p->num_strings-1);
2870:    Pike_sp[-1].u.string,    p->inherits[Pike_sp[-2].subtype].prog,    SEE_STATIC|SEE_PRIVATE); +  debug_malloc_touch(p);    if (f >= 0) {    struct svalue func;    low_object_index_no_free(&func, Pike_sp[-2].u.object, f);   #ifdef PIKE_SECURITY    /* FIXME: Check access to the function. */   #endif -  +  debug_malloc_touch(p);    pop_n_elems(2);    *Pike_sp++ = func;    dmalloc_touch_svalue(Pike_sp-1);    break;    }    else if (data->pickyness) { -  +  debug_malloc_touch(p);    if (Pike_sp[-1].u.string->size_shift)    decode_error(NULL, Pike_sp - 2, "Couldn't find identifier in ");    else    decode_error(NULL, Pike_sp - 2, "Couldn't find identifier %s in ",    Pike_sp[-1].u.string->str);    } -  +  debug_malloc_touch(p);    }    pop_stack();    break;
2958:       SETUP_DECODE_MEMOBJ(T_PROGRAM, program, p, low_allocate_program(),;);    +  debug_malloc_touch(p);    SET_ONERROR(err3, zap_unfinished_program, p);       if(data->pass == 1)
3622:    * Pike_compiler->new_program and we want ride on that one    * just like when it's created there. */    p = delayed_enc_val->u.program; +  debug_malloc_touch(p);    }    else    p = NULL;
3660:    print_svalue(stderr, &prog);    fputc('\n', stderr););    mapping_insert(data->decoded, &entry_id, &prog); +  debug_malloc_touch(p);    }       debug_malloc_touch(p);
3679:    decode_value2(data);    if (Pike_sp[-1].type == T_PROGRAM) {    p->parent = Pike_sp[-1].u.program; +  debug_malloc_touch(p->parent);    } else if ((Pike_sp[-1].type == T_INT) &&    (!Pike_sp[-1].u.integer)) {    p->parent = NULL;