Branch: Tag:

1999-01-21

1999-01-21 09:15:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

security system v1.0E-100 checked in... (lots of work left to do)

Rev: src/array.c:1.43
Rev: src/array.h:1.15
Rev: src/builtin_functions.c:1.145
Rev: src/error.h:1.26
Rev: src/interpret.c:1.112
Rev: src/interpret.h:1.25
Rev: src/main.c:1.61
Rev: src/mapping.c:1.38
Rev: src/mapping.h:1.13
Rev: src/modules/files/file.c:1.133
Rev: src/modules/system/system.c:1.61
Rev: src/multiset.c:1.13
Rev: src/multiset.h:1.8
Rev: src/object.c:1.54
Rev: src/object.h:1.20
Rev: src/opcodes.c:1.35
Rev: src/otable.h:1.3(DEAD)
Rev: src/program.c:1.106
Rev: src/program.h:1.47
Rev: src/security.c:1.1
Rev: src/security.h:1.1
Rev: src/svalue.h:1.20
Rev: src/testsuite.in:1.139
Rev: src/threads.c:1.86

5:   \*/      /* -  * $Id: interpret.h,v 1.24 1998/11/22 11:02:54 hubbe Exp $ +  * $Id: interpret.h,v 1.25 1999/01/21 09:15:02 hubbe Exp $    */   #ifndef INTERPRET_H   #define INTERPRET_H
22:    struct frame *parent_frame;    struct svalue *locals;    struct svalue *expendible; -  INT32 args; +     struct object *current_object;    struct inherit context;    char *current_storage; -  +  INT32 args;    INT32 fun;    INT16 num_locals;    INT16 num_args;
40:   #define debug_check_stack()   #endif    + #define check_stack(X) do { \ +  if(sp - evaluator_stack + (X) >= stack_size) \ +  error("Stack overflow.\n"); \ +  }while(0) +  + #define check_mark_stack(X) do { \ +  if(mark_sp - mark_stack + (X) >= stack_size) \ +  error("Mark stack overflow.\n"); \ +  }while(0) +  + #define check_c_stack(X) do { \ +  long x_= ((char *)&x_) + STACK_DIRECTION * (X) - stack_top ; \ +  x_*=STACK_DIRECTION; \ +  if(x_>0) \ +  error("C stack overflow.\n"); \ +  }while(0) +  +    #define pop_stack() do{ free_svalue(--sp); debug_check_stack(); }while(0)      #define pop_n_elems(X) \
126:   void push_sp_mark(void);   int pop_sp_mark(void);   void init_interpreter(void); - void check_stack(INT32 size); - void check_mark_stack(INT32 size); +    void lvalue_to_svalue_no_free(struct svalue *to,struct svalue *lval);   void assign_lvalue(struct svalue *lval,struct svalue *from);   union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t);