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

[perl #123817] attribute on lexical introduced in hash constructor

From:
Hugo van der Sanden
Date:
February 13, 2015 14:28
Subject:
[perl #123817] attribute on lexical introduced in hash constructor
Message ID:
rt-4.0.18-26164-1423837719-1340.123817-75-0@perl.org
# New Ticket Created by  Hugo van der Sanden 
# Please include the string:  [perl #123817]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123817 >


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

% ./perl -e '$y = { my $x : m }'
Invalid SCALAR attribute: m at -e line 1.
perl: op.c:721: Perl_op_free: Assertion `!(o->op_private & ~PL_op_private_valid[type])' failed.
Aborted (core dumped)
% 

This is OPpLVAL_INTRO set on the initial OP_LIST by my_attrs, preserved when it's converted by newANONHASH.

I suspect at least newANONLIST() and newANONHASH() should simply clear that flag, but I'm not sure what if any impact that might have, and not sure if any of the other op_convert_list() callers should.




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