New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting stashes causes SEGVs #3438
Comments
From @AlanBurlisonIf you delete a stash and then try to call something it it you get a SEGV. $ perl -e 'sub bang { print "bang!\n"; } undef %main::; bang;' $ pstack core Perl Info
|
From @TuxOn Mon, 19 Feb 2001 11:23:53 GMT, alanbur@mower.uk.sun.com wrote:
Should we allow to delete/undef %:: (%main::) anytime at all? |
From @simoncozensOn Mon, Feb 19, 2001 at 05:12:27PM +0100, H. Merijn Brand wrote:
I would say yes, on the "stupid things possible" principle or whatever Simon |
From @AlanBurlison"H.Merijn Brand" wrote:
I suspect undef of any stash with a sub in it that is subsequently Alan Burlison |
From [Unknown Contact. See original ticket]Alan Burlison <Alan.Burlison@uk.sun.com> writes:
Well I get a stack dump with ACCVIO (equiv of SEGV) from just: $ perl -e"sub foo{print 'hi';} undef %main::;" (note no attempt to call the sub) But |
From @AlanBurlisonCharles Lane wrote:
This is because of the refcount loop between a CV (code block) and its I'm currently working on fixing this, but the fix has uncovered a really Alan Burlison |
From gt4556a@prism.gatech.eduundef()ing the symbol table of package main causes coredumps. The problem has Test program: sub aaa {}; Note that the coredump doesn't occur for certain names of the above sub. * a There are certainly more names. That don't trigger the coredump. Defining a Perl Info
|
From jeff@zeroclue.comThis is a bug report for perl from jeff@zeroclue.com, Perl crashes (seg fault) when emptying the main namespace in any of the special blocks. I.E. jeff@pokey:~ $ perl -e 'CHECK{%::=()}' Flags: Site configuration information for perl v5.8.4: Configured by Debian Project at Sun Sep 26 12:11:30 CEST 2004. Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Locally applied patches: @INC for perl v5.8.4: Environment for perl v5.8.4: |
From mjtg@cam.ac.ukJeff Lavallee <jeff@zeroclue.com> wrote
This is a variation on an old chestnut. To help track it down, I note perl -we 'BEGIN { delete $::{q(@)}}' whereas perl -w doesn't fail. That's all the other keys found by doing perl -wle 'print foreach keys %::' So $@ is the thing to stare at. And as an extra data point (in case you haven't already guessed) perl -we 'eval q(delete $::{q(@)})' Mike Guy |
The RT System itself - Status changed from 'new' to 'open' |
From @rgsJeff Lavallee (via RT) wrote:
And likewise $ perl -e 'eval{%::=()}' There is a whole class of problems that come from this. A more general, but unclean, fix, would be to avoid deleting any GV in -- |
From @JohnPeacockRafael Garcia-Suarez wrote:
I got bitten by this a few times too (while spelunking in the core to John -- |
From @JohnPeacockRafael Garcia-Suarez wrote:
Yes, it is likely that the same problem exists with both of those as I'm just suggesting that there is probably a minimum number of John -- |
From @rgsJohn Peacock wrote:
I remember also fixing a similar problem with STDERR, or was it STDOUT. -- |
From @rgsJohn Peacock wrote:
That's why I was suggesting to use GvMULTI for this purpose : globals -- |
From @JohnPeacockRafael Garcia-Suarez wrote:
I don't know, I think it's pretty daft to nuke $:: like that in the Anyone want to give an actual use-case for clearing the $:: in the first John -- |
From @rgsJohn Peacock wrote:
Won't help : $ perl -e 'eval{delete$::{q{@}}}'
Clean up the namespace when you've imported lots of symbols ? If you happen |
From @iabynOn Tue, Dec 14, 2004 at 12:12:12PM -0500, John Peacock wrote:
I submitted a patch a year or two back to forbid packagemainicide, but Dave. -- |
From @hvdsRafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> wrote: I wonder whether an alternative route to fixing is to allow the deletion, I've no idea though how easy that would be to do, nor whether blindly Hugo |
From @nwc10On Wed, Dec 15, 2004 at 02:51:55PM +0000, hv@crypt.org wrote:
Or by moving out the code that creates them into a separate function, Nicholas Clark |
From @davidnicolperl -e ' CHECK{local *::; %::=()}' doesn't crash. Maybe a better solution is to localize *:: and let it fall -- |
From @smpeters
As of 5.6.2, this does still core dump; however, as of at least 5.8.6, |
From @smpeters
This has been fixed with change #26043.
|
@smpeters - Status changed from 'open' to 'resolved' |
From jeff@zeroclue.comAt least with perl 5.8.6 on Mac OS X Tiger, this appers to still be a [goo:~/Data Files] jeff% perl -e 'END{ %::=() }' This is perl, v5.8.6 built for darwin-thread-multi-2level |
1 similar comment
From jeff@zeroclue.comAt least with perl 5.8.6 on Mac OS X Tiger, this appers to still be a [goo:~/Data Files] jeff% perl -e 'END{ %::=() }' This is perl, v5.8.6 built for darwin-thread-multi-2level |
Migrated from rt.perl.org#5851 (status was 'resolved')
Searchable as RT5851$
The text was updated successfully, but these errors were encountered: