diff --git a/sv.c b/sv.c index 5ba3b1b62cea..6d8dd2683ae0 100644 --- a/sv.c +++ b/sv.c @@ -4912,10 +4912,11 @@ Perl_sv_setsv_cow(pTHX_ SV **pdsv, SV *ssv) sv_dump(dsv); } #endif - if (!CHECK_COWBUF_THRESHOLD(cur, len) - || ! CHECK_COW_THRESHOLD(cur, len)) { + if (!SvIsCOW(ssv) && + (!CHECK_COWBUF_THRESHOLD(cur, len) + || ! CHECK_COW_THRESHOLD(cur, len))) { DEBUG_C(PerlIO_printf(Perl_debug_log, - "Fast copy on write: Sizes %zu/%zu not appropriate to COW\n", cur, len)); + "Fast copy on write: Sizes %zu/%zu %p/%p not appropriate to COW\n", cur, len, dsv ? (void *)SvPVX(dsv) : (void *)0, (void*)SvPVX(ssv))); return FALSE; } if (dsv) {