Branch: Tag:

2017-09-19

2017-09-19 08:46:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Moved PIKE_DEBUG check some more.

Second attempt at fixing erroneous fatal "Stack failure in
POP_PIKE_FRAME "..." 0!" when compiling --with-debug.

572:    struct svalue *s; \    INT16 num_new_locals = 0; \    unsigned int num_bitmask_entries = 0; \ -  DO_IF_DEBUG( \ -  if( (locals + _fp_->num_locals > Pike_sp) || \ -  (Pike_sp < locals + exp_offset) || \ -  (exp_offset < 0) || (exp_offset > _fp_->num_locals)) \ -  Pike_fatal("Stack failure in POP_PIKE_FRAME " \ -  "%p+%d=%p %p %hd!\n", \ -  locals, _fp_->num_locals, \ -  locals + _fp_->num_locals, \ -  Pike_sp, exp_offset)); \ +     if(_fp_->flags & PIKE_FRAME_SAVE_LOCALS) { \    ptrdiff_t offset; \    for (offset = 0; \
589:    if (*(_fp_->save_locals_bitmask + offset)) \    num_bitmask_entries = offset + 1; \    } \ +  } else { \ +  DO_IF_DEBUG( \ +  if( (locals + _fp_->num_locals > Pike_sp) || \ +  (Pike_sp < locals + exp_offset) || \ +  (exp_offset < 0) || (exp_offset > _fp_->num_locals)) \ +  Pike_fatal("Stack failure in POP_PIKE_FRAME " \ +  "%p+%d=%p %p %hd!\n", \ +  locals, _fp_->num_locals, \ +  locals + _fp_->num_locals, \ +  Pike_sp, exp_offset)); \    } \    \    num_new_locals = MAXIMUM(exp_offset, num_bitmask_entries << 4); \