Skip Menu |

This queue is for tickets about the B-Debug CPAN distribution.

Report information
The Basics
Id: 79028
Status: resolved
Priority: 0/
Queue: B-Debug

People
Owner: RURBAN [...] cpan.org
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

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



Subject: Fix to work with B::PADLIST
In trying to fix a perl bug, I have found the need to stop padlists from being AVs. See the branch I pushed to <http://perl5.git.perl.org/perl.git/shortlog/refs/heads/sprout/padlist>. (It’s not finished yet. It still needs docs.) This breaks B::Debug, because svref_2object(sub{})->PADLIST now returns an object of type B::PADLIST. Attached is a patch to fix it. I eagerly await a new release, so I can merge this to blead. :-)
Subject: open_esbBLVyO.txt
diff -rup B-Debug-1.17-DsWHyx-orig/Debug.pm B-Debug-1.17-DsWHyx/Debug.pm --- B-Debug-1.17-DsWHyx-orig/Debug.pm 2011-11-25 13:52:30.000000000 -0800 +++ B-Debug-1.17-DsWHyx/Debug.pm 2012-08-16 16:57:28.000000000 -0700 @@ -285,11 +285,16 @@ EOT sub B::AV::debug { my ($av) = @_; $av->B::SV::debug; + _array_debug($av); +} + +sub _array_debug { + my ($av) = @_; # tied arrays may leave out FETCHSIZE my (@array) = eval { $av->ARRAY; }; print "\tARRAY\t\t(", join(", ", map("0x" . $$_, @array)), ")\n"; my $fill = eval { scalar(@array) }; - if ($Config{'useithreads'}) { + if ($Config{'useithreads'} && class($av) ne 'PADLIST') { printf <<'EOT', $fill, $av->MAX, $av->OFF; FILL %d MAX %d @@ -353,6 +358,15 @@ sub B::SPECIAL::debug { print exists $specialsv_name[$i] ? $specialsv_name[$i] : "", "\n"; } +sub B::PADLIST::debug { + my ($padlist) = @_; + printf <<'EOT', class($padlist), $$padlist, $padlist->REFCNT; +%s (0x%x) + REFCNT %d +EOT + _array_debug($padlist); +} + sub compile { my $order = shift; B::clearsym();
Thanks, looks good, but I'm on a terribly bad network now. Maybe it will need a few days. On Thu Aug 16 19:58:21 2012, SPROUT wrote: Show quoted text
> In trying to fix a perl bug, I have found the need to stop padlists > from being AVs. > > See the branch I pushed to >
<http://perl5.git.perl.org/perl.git/shortlog/refs/heads/sprout/padlist>. Show quoted text
> (It’s not finished yet. > It still needs docs.) > > This breaks B::Debug, because svref_2object(sub{})->PADLIST now > returns an object of type > B::PADLIST. > > Attached is a patch to fix it. > > I eagerly await a new release, so I can merge this to blead. :-)
-- Reini Urban
Fixed with 1.18 Thanks! I was not yet able to check why you need to add new PADLIST flags. I will break most of my work, but should be easy to fix. -- Reini Urban