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

[perl #123790] readline assert on SvOK_off(glob)

Thread Previous
From:
Hugo van der Sanden
Date:
February 11, 2015 02:55
Subject:
[perl #123790] readline assert on SvOK_off(glob)
Message ID:
rt-4.0.18-9772-1423623300-759.123790-75-0@perl.org
# New Ticket Created by  Hugo van der Sanden 
# Please include the string:  [perl #123790]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123790 >


AFL (<http://lcamtuf.coredump.cx/afl)>) finds this:

% ./miniperl -e '*x=<y>'
miniperl: pp_hot.c:1637: Perl_do_readline: Assertion `!((((targ)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((targ)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((targ)->sv_flags & 0xff)) == SVt_PVLV))' failed.
Aborted (core dumped)
% 

Conversely, '*x=<>' avoids the problem going through the path a few lines further down after the have_fp label, generating a reasonable "Can't coerce GLOB to string" at the point of:
        else if (isGV_with_GP(sv)) {
            SvPV_force_nomg_nolen(sv);
        }

I don't know near enough about this area to hazard a guess at a fix. Oddly, bisect points at this:

commit 288b8c02c5ee89a2978a1b9e56ed255c53beb793
Author: Nicholas Clark <nick@ccl4.org>
Date:   Wed Jan 2 13:47:42 2008 +0000

    Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,
    and regexp reference counting is via the regular SV reference counting.
    This was not as easy at it looks.

.. which doesn't seem a hugely likely culprit.

Hugo


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