diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-09 20:47:18 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-10 06:08:23 -0700 |
commit | 4505a31f43ca4e1a0e9203b389f6d4bebab9d899 (patch) | |
tree | f81c8a36f9bd6de6e852409144824f0ad58fd7df /gv.c | |
parent | 8f25f6c031ddddc08edd62173255cda84d4a05fd (diff) | |
download | perl-4505a31f43ca4e1a0e9203b389f6d4bebab9d899.tar.gz |
[perl #115206] Don’t crash when vivifying $|
It was trying to read the currently-selected handle without checking
whether it was selected. It is actually not necessary to initialise
the variable this way, as the next use of get-magic on it will clobber
the cached value.
This initialisation was originally added in commit d8ce0c9a45. The
bug it was fixing was probably caused by missing FETCH calls that are
no longer missing.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1913,10 +1913,6 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "$%c is no longer supported", *name); break; - case '|': /* $| */ - sv_setiv(GvSVn(gv), (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0); - goto magicalize; - case '\010': /* $^H */ { HV *const hv = GvHVn(gv); @@ -1957,6 +1953,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, case '>': /* $> */ case '\\': /* $\ */ case '/': /* $/ */ + case '|': /* $| */ case '$': /* $$ */ case '\001': /* $^A */ case '\003': /* $^C */ |