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

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

Thread Next
From:
Tony Cook via RT
Date:
July 17, 2013 05:38
Subject:
[perl #117543] protect some magic %main:: symbols from being deleted
Message ID:
rt-3.6.HEAD-2552-1374039491-961.117543-15-0@perl.org
On Wed Apr 10 04:29:03 2013, nicholas wrote:
> But I guess this comes down to a design decision - what are those
> pointers
> really about. Are they a speedup, where the desired semantic remains
> that
> the interpreter behaves as if it's looking things up in %:: as it
> needs them?
> Or are they a specified part of the implementation, in that the
> interpreter's
> direct pointers are *initially* made available in %::, but if Perl-
> space is
> careless it can loose its access to them?

I'd mostly prefer to protect symbols, but I wonder if that would
prevent interesting uses[1] of the current implementation.

We have three choices I can think of:

1) retain the current implementation - the user can crash perl from 
pure perl, but there might be interesting things the user can do 
with that power.

2) protect any globals connected to PL_* from deletion

3) ensure PL_* are updated when their perl variables are updated.

I can see 2) or 3) having a performance impact if they cover all the
variables we want to protect (if we do it by name.)

I don't really have an opinion either way.

Tony

(Looking at this ticket because it has patches.)

[1] none of which I can think of right now

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

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