OK, the patch should now be complete. There is condition whether to use all-duplicate code path: if (pre_assignment_length != post_assignment_length || v->pm->node.flags & (PM_SPECIAL|PM_UNIQUE)) { This covers special arrays and uniq arrays, that should be always calling setfn() to trigger side-effects. Other arrays use this code: /* v->start is 0-based */ p = old + v->start; for (r = val; *r;) { /* Free previous string */ zsfree(*p); /* Give away ownership of the string */ *p++ = *r++; } And it should be OK, zsfree() for non-special array should be always successful. -- Sebastian Gniazdowski psprint@fastmail.com