summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2007-03-14 12:34:05 +0000
committerDave Mitchell <davem@fdisolutions.com>2007-03-14 12:34:05 +0000
commitcac5437927d43225e7f3691060e4b68064403bfc (patch)
tree4b6ddd7b5948b06e6d52ed2f9db304078b7f0899 /gv.c
parenta95ba31dfb70272b340c954f0d61c045db386ebc (diff)
downloadperl-cac5437927d43225e7f3691060e4b68064403bfc.tar.gz
use a fresh stack when loading Errno.pm etc.
Stops 'use vars qw($!)' in lib/vars.t segfaulting. (This can be reduced to 'my $sym = "!"; *$sym = \$$sym') p4raw-id: //depot/perl@30577
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 6c664db956..26308bb273 100644
--- a/gv.c
+++ b/gv.c
@@ -697,11 +697,12 @@ S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methp
so save it. For the moment it's always
a single char. */
dSP;
- PUTBACK;
ENTER;
if ( flags & 1 )
save_scalar(gv);
+ PUSHSTACKi(PERLSI_MAGIC);
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, module, NULL);
+ POPSTACK;
LEAVE;
SPAGAIN;
stash = gv_stashsv(namesv, 0);