refcount of the shared scalar, we really must protect
that refcount increase with a lock, or else it might not
happen. Fixes segfault when objects would prematurely
be killed.
p4raw-id: //depot/perl@18593
MAGIC *nmg = sv_magicext(nsv,mg->mg_obj,
toLOWER(mg->mg_type),&sharedsv_elem_vtbl,
name, namlen);
+ ENTER_LOCK;
SvREFCNT_inc(SHAREDSvPTR(shared));
+ LEAVE_LOCK;
nmg->mg_flags |= MGf_DUP;
return 1;
}