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

Re: [perl #129898] op.c:9874: OP *Perl_ck_rvconst(OP *): Assertion`((gv)->sv_flags & 0x00000800)' failed

Thread Previous
From:
Dave Mitchell
Date:
March 27, 2017 11:49
Subject:
Re: [perl #129898] op.c:9874: OP *Perl_ck_rvconst(OP *): Assertion`((gv)->sv_flags & 0x00000800)' failed
Message ID:
20170327114944.GP3342@iabyn.com
On Fri, Nov 11, 2016 at 04:39:09AM -0800, Hugo van der Sanden via RT wrote:
> This can be reduced to:
> 
> % ./miniperl -we 'BEGIN { delete $::{"main::"} } :: = 0'
> miniperl: op.c:9873: Perl_ck_rvconst: Assertion `((gv)->sv_flags & 0x00000800)' failed.
> Aborted (core dumped)
> % 
> 
> I'm not sure exactly what ':: = 0' means (filehandle assignment?);

It's just a bareword string; equivalent to "::" = 0;

> sticking a star in there gives a slightly different assert:
> 
> % ./miniperl -we 'BEGIN { delete $::{"main::"} } *:: = 0'
> miniperl: op.c:9872: Perl_ck_rvconst: Assertion `iscv' failed.
> Aborted (core dumped)
> % 
> 
> I'm not sure this is more than "doctor, my foot hurts when I shoot like this".

A bisect shows them both fixed by the following, which sounds
plausible. So I'll close the ticket.

commit 120921acd4cf27bb932a725a8cf5c957652b22eb
Author: Zefram <zefram@fysh.org>
Date:   Sun Jan 22 07:26:34 2017 +0000

    fix special-case recreation of *::
    
    If *:: is called for then as a special case it is looked up as
    $::{"main::"}.  If $::{"main::"} has been deleted, then that hash entry
    is recreated.  But formerly it was only recreated as an undef scalar,
    which broke things relying on glob lookup returning a glob.  Now in
    that special case the recreated hash entry is initialised as a glob,
    and populated with the customary recursive reference to the main stash.
    Fixes [perl #129869].


-- 
You never really learn to swear until you learn to drive.

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