Devel::Size looks at the SvMAGIC pointer for any SV that's SVt_PVMG or above.
This is incorrect. It is actually necessary (and sufficient) to check the
SvMAGICAL flag. Attached patch fixes.
}
st->total_size += sizeof(SV) + body_sizes[type];
- if (type >= SVt_PVMG) {
+ if (SvMAGICAL(thing)) {
magic_size(aTHX_ thing, st);
}