Subject: | B::SVOP->sv broken by B::Generate |
Date: | Sun, 21 Aug 2011 17:47:29 +0100 |
To: | bug-B-Generate [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
B::Generate breaks dumping of const ops on threaded perls:
$ perl -MO=Concise -lwe 'print 123' | grep const
-e syntax OK
4 <$> const[IV 123] s ->5
$ perl -MB::Generate -MO=Concise -lwe 'print 123' | grep const
-e syntax OK
4 <$> const(IV \143490328)[t1] s ->5
Empirically, it can be avoided by squashing B::Generate's replacement
of B::SVOP->sv:
$ perl -MO=Concise -lwe 'BEGIN { require B; my $sv = \&B::SVOP::sv; require B::Generate; *B::SVOP::sv = $sv; } print 123' | grep const
Subroutine B::SVOP::sv redefined at -e line 1.
-e syntax OK
4 <$> const[IV 123] s ->5
I haven't determined exactly what's wrong with the replacement method.
-zefram