diff options
author | Devin Heitmueller <devin.heitmueller@gmail.com> | 2007-02-20 08:38:20 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-02-25 16:44:52 +0000 |
commit | 191f87d57c0c1de37eade12374d34b5d6bd6302a (patch) | |
tree | ed272455fcab6641241005e930af5e8ad0ffd6bd /util.c | |
parent | 4f8a7904197dd025b819b8286e290f52246539b7 (diff) | |
download | perl-191f87d57c0c1de37eade12374d34b5d6bd6302a.tar.gz |
[perl #41560] [PATCH] crash in Perl_vmess when GvIOp is null
From: "Devin Heitmueller" (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-24617-1172018300-131.41560-75-0@perl.org>
p4raw-id: //depot/perl@30398
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1154,7 +1154,10 @@ Perl_vmess(pTHX_ const char *pat, va_list *args) if (CopLINE(cop)) Perl_sv_catpvf(aTHX_ sv, " at %s line %"IVdf, OutCopFILE(cop), (IV)CopLINE(cop)); - if (GvIO(PL_last_in_gv) && IoLINES(GvIOp(PL_last_in_gv))) { + /* Seems that GvIO() can be untrustworthy during global destruction. */ + if (GvIO(PL_last_in_gv) && (SvTYPE(GvIOp(PL_last_in_gv)) == SVt_PVIO) + && IoLINES(GvIOp(PL_last_in_gv))) + { const bool line_mode = (RsSIMPLE(PL_rs) && SvCUR(PL_rs) == 1 && *SvPVX_const(PL_rs) == '\n'); Perl_sv_catpvf(aTHX_ sv, ", <%s> %s %"IVdf, |