Sat Jun 07 01:13:46 2014: Request 96279 was acted upon.
Transaction: Correspondence added by rur...@x-ray.at
       Queue: Win32-API
     Subject: "Perl -MO=Xref Win32/API.pm" (0.74, 0.77) gives runtime error on 
Perl 5.12.4
   Broken in: 0.74, 0.77
    Severity: Normal
       Owner: Nobody
  Requestors: arul.cse...@ymail.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=96279 >


On Sat Jun 07 00:57:06 2014, rur...@x-ray.at wrote:
> This is a B::Xref bug, nothing that Win32::API can fix.
> I'll try to find a reproducer on a better platform and fix it in core.
> It sounds very familiar to me.

A better reproducable bug (e.g. on linux) is with 5.12 and 5.14 threaded with 
-e'use ExtUtils::ParseXS'.
at B/Xref.pm:160
  next if class($valsv->STASH) eq 'SPECIAL';
for a B::BM object which is falsely reported as GV in these versions. I had to 
fix that in B::C also.

The fix is as follows:

--- /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi-debug/B/Xref.pm.orig  
2013-12-02 17:01:18.000000000 -0600
+++ /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi-debug/B/Xref.pm       
2014-06-07 00:10:31.418466112 -0500
@@ -157,6 +157,7 @@
        for ($ix = 1; $ix < @vallist; $ix++) {
            my $valsv = $vallist[$ix];
            next unless class($valsv) eq "GV";
+           next if $] > 5.010 and $valsv->FLAGS & 0x40000000; # no B::BM
             next if class($valsv->STASH) eq 'SPECIAL';
            # these pad GVs don't have corresponding names, so same @pad
            # array can be used without collisions



Reply via email to