develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #128263] Assert fail in Perl_magic_get without other symptoms- '{tell$0;i${^LAST_FH}}'

Thread Previous
From:
Tony Cook via RT
Date:
August 11, 2016 01:40
Subject:
[perl #128263] Assert fail in Perl_magic_get without other symptoms- '{tell$0;i${^LAST_FH}}'
Message ID:
rt-4.0.24-17122-1470879621-331.128263-15-0@perl.org
On Thu May 26 19:44:50 2016, sprout wrote:
> On Thu May 26 19:24:25 2016, dcollinsn@gmail.com wrote:
> > dcollins@nightshade64:~/perldebug$ ./perl -Ilib -e
> > '{tell$0;i${^LAST_FH}}'
> > perl: mg.c:964: Perl_magic_get: Assertion `((((PL_last_in_gv)-
> > > sv_flags & (0x00004000|0x00008000)) == 0x00008000) &&
> > (((svtype)((PL_last_in_gv)->sv_flags & 0xff)) == SVt_PVGV ||
> > ((svtype)((PL_last_in_gv)->sv_flags & 0xff)) == SVt_PVLV))' failed.
> > Aborted
> 
> Here is a clearer test case:
> 
> $ ./perl -Ilib -e 'tell $0; ${^LAST_FH}->i'
> Assertion failed: (isGV_with_GP(PL_last_in_gv)), function
> Perl_magic_get, file mg.c, line 964.
> Abort trap: 6
> 
> Without the method call, it doesn’t fail.

It's pretty much any reference to ${^LAST_FH), since the assertion is in the magic for ${^LAST_FH}.

The attached fixes it for me.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=128263

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About