develooper Front page | perl.perl5.porters | Postings from February 2018

[perl #132920] Assertion `SvTYPE(sv) != (svtype)SVTYPEMASK' failed

Thread Next
Tony Cook via RT
February 28, 2018 03:18
[perl #132920] Assertion `SvTYPE(sv) != (svtype)SVTYPEMASK' failed
Message ID:
On Tue, 27 Feb 2018 18:03:54 -0800, wrote:
> This assertion failure is triggered in Perl v5.27.9 (v5.27.8-408-ga0da1e1.
> ./perl -e '($a)=map[split//],G0;$0=map abs($0[$a++]),@$a'
> perl: sv.c:6508: void Perl_sv_clear(SV *const): Assertion `SvTYPE(sv) !=
> (svtype)SVTYPEMASK' failed.

This looks like another stack-not-refcunted issue.

$a ends up as [ "G", "0" ], and the "G" and "0" scalars are pushed onto the stack.

The $a++ converts $a from a reference to a large integer, freeing both the array and it's contents, leaving an unreferenced SV on the stack.


via perlbug:  queue: perl5 status: new

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