Branch: Tag:

2013-01-29

2013-01-29 16:17:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

DEBUG: Fixed broken size check for weak mappings.

Fixes fatal "Rehash failed, size not same any more.".

554:    }      #ifdef PIKE_DEBUG -  if(m->data->size != tmp) -  Pike_fatal("Rehash failed, size not same any more.\n"); +  if((m->data->size != tmp) && +  ((m->data->size > tmp) || !(m->data->flags & MAPPING_WEAK))) +  Pike_fatal("Rehash failed, size not same any more (%ld != %ld).\n", +  (long)m->data->size, (long)tmp);   #endif   #ifdef MAPPING_SIZE_DEBUG    m->debug_size = m->data->size;