Skip Menu |

This queue is for tickets about the Devel-FindRef CPAN distribution.

Report information
The Basics
Id: 35386
Status: resolved
Priority: 0/
Queue: Devel-FindRef

People
Owner: Nobody in particular
Requestors: chris [...] heathens.co.nz
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.1
Fixed in: (no value)



Subject: [PATCH] Weaken magic gets corrupted
I often see error messages like the following after running Devel::FindRef::track: panic: magic_killbackrefs (flags=ff). Devel::Peek::Dump was showing two backref(<) magic records for some SVs, and I realized this was happening because of calling sv_rvweaken while RMAGICAL was turned off. The attached patch fixes it.
Subject: Devel-FindRef.magic.patch
--- Devel-FindRef-1.1/FindRef.xs 2007-12-29 15:53:16.000000000 -0500 +++ Devel-FindRef-1.1-mod/FindRef.xs 2008-04-24 17:25:53.000000000 -0400 @@ -16,7 +16,9 @@ { \ AV *av = newAV (); \ av_push (av, newSVpv (text, 0)); \ + if (rmagical) SvRMAGICAL_on (sv); \ av_push (av, sv_rvweaken (newRV_inc (sv))); \ + if (rmagical) SvRMAGICAL_off (sv); \ av_push (about, newRV_noinc ((SV *)av)); \ }
Thanks, applied, see private correspondence.