Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Use of freed value

by shmem (Chancellor)
on Jun 26, 2019 at 17:35 UTC ( [id://11101971]=note: print w/replies, xml ) Need Help??


in reply to Use of freed value

Ah, ikegami already posted the answer... in a ticket in the perl bug tracker dave_the_m(?) says
a (more or less unfixable) design flaw in perl's internals: the stack not being ref counted.

and shows this code example

%h = qw( a 1 b 2 ); f(%h); sub f { %h = qw(c 3); # uh oh :-( use Carp; Carp::confess(); } __END__ at /home/davem/tmp/p line 10. main::f("a", "", "b", 3) called at /home/davem/tmp/p line 5

which is akin to those ikegami posted.

For perl v5.26 the output is slightly different:

at baz.pl line 10. main::f("a", "", "b", "") called at baz.pl line 5

This might be due to other fixes than the underlying issue, which is still there.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11101971]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found