Re: [mp2] [BUG] Segfault with Test::More - duping STDOUT?

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Tuesday, 06 December 2011 17:40:14 Merlyn Kline wrote:
> To REPRODUCE the problem, you need a Broken.pm module like this:
> 
>     package Broken;
>     my $Testout;
>     create(); sub create { # Insert "{#" at the start of this line and the
> segfault goes away open( $Testout, ">&STDOUT" ) or die "Can't dup
> STDOUT:  $!"; }
> 
> and a script like this:
> 
>     #!/usr/bin/perl -w
> 
>     use Broken;
> 
>     print "Content-Type: text/html\r\n\r\nhello ";
>     open TEST, "|/bin/cat";
>     close TEST;
>     print "world\n";
> 
> Holding down F5 to generate reloads soon causes a segfault (my server is
> configured for five mod_perl processes).
> 
> Note that if the code to dup STDOUT is not in a sub then the fault seems to
> go away.

Can you reproduce the bug with modperl 2.0.5 or above (trunk)? There is a bug 
that has been fixed in 2.0.5 that could course this behavior (I guess).

see http://svn.apache.org/viewvc?view=revision&revision=932875

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.