Perl_sv_dup should be allocating bodies based on *size*, not the
Nicholas Clark [Fri, 16 Dec 2005 18:12:26 +0000 (18:12 +0000)]
length to copy.

p4raw-id: //depot/perl@26378

sv.c

diff --git a/sv.c b/sv.c
index 5029fb2..b2a2fef 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9314,9 +9314,9 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param)
            case SVt_PVNV:
            case SVt_PVIV:
            case SVt_PV:
-               assert(sv_type_details->copy);
+               assert(sv_type_details->size);
                if (sv_type_details->arena) {
-                   new_body_inline(new_body, sv_type_details->copy, sv_type);
+                   new_body_inline(new_body, sv_type_details->size, sv_type);
                    new_body
                        = (void*)((char*)new_body - sv_type_details->offset);
                } else {