On Tue, Feb 18, 2014 at 4:10 PM, Michael Gerdau m...@qata.de wrote:
Hi list !
Hi Michael!
I have some legacy modules originating in the dim past of perl 5.6.x
which is to say there are likely quite a few quirks in the code.
The new() constructor of both does bless them using a stmt
ST(0) = sv_2mortal(sv_bless(newRV_noinc((SV*)hv),stash));
and stash is initialized by
if (sv_isobject(pkg))
stash = SvSTASH(SvRV(pkg));
else
stash = gv_stashsv(pkg, TRUE);
with pkg being the first parameter passed to new().
Both foo and bar also have a sub AUTOLOAD.
Inside the sub AUTOLOAD of bar there is
$self-SUPER::fum(@_)
and fum being a sub of foo.
Hey, that looks like some code I have written.. :)
In 5.16.2 (and all prior versions I tried over the years) this works
as expected by finally invoking foo-fum.
In 5.18.1 (by means of stepping through it in the debugger) the line
$self-SUPER::fum(@_)
inside bar-AUTOLOAD again invokes bar-AUTOLOAD where it hits once
again the line
$self-SUPER::fum(@_)
which again invokes ... and there is a recursive loop.
You are hitting this bug:
https://rt.perl.org/Public/Bug/Display.html?id=120694
It has been fixed in 5.18.2.
Cheers,
-Jan