pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.176 2000/12/01 08:09:48 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.177 2000/12/04 19:39:45 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:57:   #define EVALUATOR_STACK_SIZE 100000      #define TRACE_LEN (100 + t_flag * 10)      /* Keep some margin on the stack space checks. They're lifted when    * handle_error runs to give it some room. */   #define SVALUE_STACK_MARGIN 100 /* Tested in 7.1: 40 was enough, 30 wasn't. */   #define C_STACK_MARGIN 8000 /* Tested in 7.1: 3000 was enough, 2600 wasn't. */       + PMOD_EXPORT const char *Pike_check_stack_errmsg = +  "Svalue stack overflow. " +  "(%ld of %ld entries on stack, needed %ld more entries)\n"; + PMOD_EXPORT const char *Pike_check_mark_stack_errmsg = +  "Mark stack overflow.\n"; + PMOD_EXPORT const char *Pike_check_c_stack_errmsg = +  "C stack overflow.\n"; +  +    #ifdef PIKE_DEBUG   static char trace_buffer[2000];   #endif         /* Pike_sp points to first unused value on stack    * (much simpler than letting it point at the last used value.)    */   PMOD_EXPORT struct Pike_interpreter Pike_interpreter;   PMOD_EXPORT int stack_size = EVALUATOR_STACK_SIZE;
pike.git/src/interpret.c:1636: Inside #if defined(PIKE_DEBUG)
   f->locals > &(Pike_interpreter.evaluator_stack[stack_size]))    fatal("Local variable pointer points to FinspĂ„ng.\n");       if(f->args < 0 || f->args > stack_size)    fatal("FEL FEL FEL! HELP!! (corrupted pike_frame)\n");    }    }   }   #endif    + PMOD_EXPORT void custom_check_stack(size_t amount, const char *fmt, ...) + { +  if (low_stack_check(amount)) { +  va_list args; +  va_start(args, fmt); +  va_error(fmt, args); +  } + } +    PMOD_EXPORT void cleanup_interpret(void)   {   #ifdef PIKE_DEBUG    int e;   #endif       while(Pike_fp)    POP_PIKE_FRAME();      #ifdef PIKE_DEBUG