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

[perl #128189] Assert fail in sv.c with no further symptoms: et''/$0{\0}

Thread Next
Father Chrysostomos via RT
May 19, 2016 22:22
[perl #128189] Assert fail in sv.c with no further symptoms: et''/$0{\0}
Message ID:
On Thu May 19 15:02:05 2016, sprout wrote:
> On Thu May 19 14:53:18 2016, wrote:
> > The slightly shorter testcase:
> > 
> > perl -W -e 'e f/$0{\0}/'
> > 
> > also shows this error
> Shorter:
> perl -we '"$0{\0}"'
> perl -we '/$0{\0}/'
> Any uninitialized warning that tries to mention $0{\0} will trigger it.

It appears that the subscript has to be an OP_CONST, because qr// doesn’t trigger it.

A bisect points to:

commit 04698ff67968faa57a46c12d31e17c17baf08876
Author: Father Chrysostomos <>
Date:   Sat Nov 27 06:22:24 2010 -0800

    [perl #79178] STORE/FETCH of tie()d hash get stringified key

but that is a red herring.  It fixed another bug, exposing this one.

Here is a similar bug with array indices.  There is no crash here, but the number in the subscript is bogus:

$ ./miniperl -we '"$0[\0]"'
Useless use of string in void context at -e line 1.
Use of reference "SCALAR(0x7fad6882fcf0)" as array index at -e line 1.
Use of uninitialized value $0[1753414896] in string at -e line 1.
$ perl -le 'print 0x7fad6882fcf0'

I would expect the output of the latter command to match the subscript in the uninit warning.


Father Chrysostomos

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About