develooper Front page | perl.perl5.porters | Postings from December 2013

[perl #117543] protect some magic %main:: symbols from being deleted

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
December 22, 2013 00:55
Subject:
[perl #117543] protect some magic %main:: symbols from being deleted
Message ID:
rt-4.0.18-16196-1387673706-643.117543-15-0@perl.org
I've attached what I think is a a pure perl example of this bug, run with 5.10.0. Correct me if it isn't an example.

--------------------------------------------------------------------
C:\Documents and Settings\Owner\Desktop>perl stashdelete.pl
$@ not equal to glob SCALAR  at stashdelete.pl line 11.

C:\Documents and Settings\Owner\Desktop>perl stashdelete.pl

C:\Documents and Settings\Owner\Desktop>
--------------------------------------------------------------------

1st run is with the "delete $::{'@'};" active. 2nd is with "delete $::{'@'};" commented out.

Now a "my $walker = B::Concise::compile('-src','-exec', *run{CODE});"
--------------------------------------------------------------------
C:\Documents and Settings\Owner\Desktop>perl stashdelete.pl
B::Concise::compile(CODE(0x182a53c))
# 13: eval {dienow()};
1  <;> nextstate(main 352 stashdelete.pl:13) v:{
2  <|> entertry(other->3) v
# 13: eval {dienow()};
r  <;> nextstate(main 351 stashdelete.pl:13) v
s  <0> pushmark s
t  <#> gv[*dienow] s
u  <1> entersub[t2] vKS/TARG,1
3  <@> leavetry vK
# 14: die '$@ is broken' if index($@,"die now") != 0;
4  <;> nextstate(main 352 stashdelete.pl:14) v:{
5  <#> gvsv[*@] s
6  <$> const[GV "die now"] s
7  <@> index[t5] sK/2
8  <$> const[IV 0] s
9  <2> ne sK/2
a  <|> and(other->b) vK/1
b      <0> pushmark s
c      <$> const[PV "$@ is broken"] s
d      <@> die[t3] vK/1
# 15: die '$@ not equal to glob SCALAR ' if $@ ne ${ *{'main::@'}{SCALAR} };
e  <;> nextstate(main 354 stashdelete.pl:15) v:{
f  <#> gvsv[*@] s
g  <$> const[PV "main::@"] s
h  <1> rv2gv sKR/1
i  <$> const[PV "SCALAR"] s/BARE
j  <2> gelem sK/2
k  <1> rv2sv sK/1
l  <2> sne sK/2
m  <|> and(other->n) K/1
n      <0> pushmark s
o      <$> const[PV "$@ not equal to glob SCALAR "] s
p      <@> die[t6] sK/1
q  <1> leavesub[1 ref] K/REFC,1

C:\Documents and Settings\Owner\Desktop>
-------------------------------------------------------------
-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=117543

Thread Previous | Thread Next


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