From: Nicholas Clark Date: Fri, 26 Apr 2002 23:27:23 +0000 (+0100) Subject: Re: [ID 20020425.012] segfault when printing to close indirect filehandle X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f55e507de7c660df4146d83969f0e0bed96e11d5;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20020425.012] segfault when printing to close indirect filehandle Message-ID: <20020426222722.GH312@Bagpuss.unfortu.net> p4raw-id: //depot/perl@16203 --- diff --git a/t/lib/warnings/pp_hot b/t/lib/warnings/pp_hot index 11826b9..7df18af 100644 --- a/t/lib/warnings/pp_hot +++ b/t/lib/warnings/pp_hot @@ -105,6 +105,16 @@ print() on closed filehandle STDIN at - line 4. print() on closed filehandle STDIN at - line 6. (Are you trying to call print() on dirhandle STDIN?) ######## +# pp_hot.c [pp_print] +# [ID 20020425.012] from Dave Steiner +# This goes segv on 5.7.3 +use warnings 'closed' ; +my $fh = *STDOUT{IO}; +close STDOUT or die "Can't close STDOUT"; +print $fh "Shouldn't print anything, but shouldn't SEGV either\n"; +EXPECT +print() on closed filehandle at - line 7. +######## # pp_hot.c [pp_rv2av] use warnings 'uninitialized' ; my $a = undef ;