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

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

From:
Tony Cook via RT
Date:
August 31, 2017 00:30
Subject:
[perl #128263] Assert fail in Perl_magic_get without other symptoms- '{tell$0;i${^LAST_FH}}'
Message ID:
rt-4.0.24-12892-1504139437-718.128263-15-0@perl.org
On Wed, 10 Aug 2016 18:40:21 -0700, tonyc wrote:
> 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.

Applied as 745e740c825d415f535852b90516127e64c24905, fixing the incomplete sentence at the end.

Tony


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



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