diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-21 00:46:14 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-21 00:46:14 +0000 |
commit | 2d5e9e5d1dfda924cd025894f9c8781ba03c3c8c (patch) | |
tree | 1a13ca1cdda52d63b3c96fa0314f77a006b95a58 /scope.c | |
parent | a83e3d3ce76b34dfbf0c18f74b132c113d546c4a (diff) | |
download | perl-2d5e9e5d1dfda924cd025894f9c8781ba03c3c8c.tar.gz |
Integrate changes #9262,9264,9265,9266 from maintperl to mainline.
revert the leak fix in change#9142 (problem needs a more experimental
fix unsuitable for 5.6.1)
do alphabetical sorting by default (for csh compatibility)
cut-n-paste goof in change#9264
VMS piping fixes (from Charles Lane)
p4raw-link: @9266 on //depot/maint-5.6/perl: 72d1c956969523b19a71b5ffb5af9479f09d0e6a
p4raw-link: @9265 on //depot/maint-5.6/perl: 8549c3fc2da30e970df00a46a796a39e843777aa
p4raw-link: @9264 on //depot/maint-5.6/perl: 1086ad2319c3ee3e3873c478e76309ea4f03453b
p4raw-link: @9262 on //depot/maint-5.6/perl: a89eb504d1201e0dad09aaf86db07d000904f216
p4raw-link: @9142 on //depot/maint-5.6/perl: 26972843796e21c404c9d13ec5ee86e7b952a2bd
p4raw-id: //depot/perl@9269
p4raw-integrated: from //depot/maint-5.6/perl@9268 'copy in'
ext/File/Glob/Changes ext/File/Glob/bsd_glob.c
ext/File/Glob/bsd_glob.h (@5902..) ext/File/Glob/Glob.pm
(@7770..) vms/vmspipe.com (@8636..) vms/vms.c (@8986..) 'edit
in' ext/File/Glob/Glob.xs (@9264..) 'merge in' scope.c
(@9142..)
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -207,6 +207,9 @@ S_save_scalar_at(pTHX_ SV **sptr) } SvMAGIC(sv) = SvMAGIC(osv); SvFLAGS(sv) |= SvMAGICAL(osv); + /* XXX SvMAGIC() is *shared* between osv and sv. This can + * lead to coredumps when both SVs are destroyed without one + * of their SvMAGIC() slots being NULLed. */ PL_localizing = 1; SvSETMAGIC(sv); PL_localizing = 0; @@ -678,19 +681,20 @@ Perl_leave_scope(pTHX_ I32 base) SvMAGICAL_off(sv); SvMAGIC(sv) = 0; } - /* XXX this branch is pretty bogus--note that we seem to - * only get here if the mg_get() in save_scalar_at() ends - * up croaking. This code irretrievably clears(!) the magic - * on the SV to avoid further croaking that might ensue - * when the SvSETMAGIC() below is called. This needs a - * total rethink. --GSAR */ + /* XXX This branch is pretty bogus. This code irretrievably + * clears(!) the magic on the SV (either to avoid further + * croaking that might ensue when the SvSETMAGIC() below is + * called, or to avoid two different SVs pointing at the same + * SvMAGIC()). This needs a total rethink. --GSAR */ else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) && SvTYPE(value) != SVt_PVGV) { SvFLAGS(value) |= (SvFLAGS(value) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; SvMAGICAL_off(value); - mg_free(value); + /* XXX this is a leak when we get here because the + * mg_get() in save_scalar_at() croaked */ + SvMAGIC(value) = 0; } SvREFCNT_dec(sv); *(SV**)ptr = value; |