Greetings.

I accidentally made the mistake of calling Apache2::Request->new() without passing $r, and it turns out that causes Apache to segfault and not return anything to the browser. I'm only pointing this out because it seems like there should be a more graceful way of handling this.

### Code
package Test::Handler;

use Apache2::RequestRec;
use Apache2::Const -compile => qw(OK);

sub handler
{
  my ($r) = @_;

  my $req = Apache2::Request->new();

  return Apache2::Const::OK;
}

1;
### End Code

### Log (LogLevel debug)
[Thu Dec 06 02:16:46 2007] [notice] Apache/2.2.3 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
[Thu Dec 06 02:16:46 2007] [info] Server built: Dec  2 2007 18:11:50
[Thu Dec 06 02:16:46 2007] [debug] prefork.c(993): AcceptMutex: sysvsem (default: sysvsem) [Thu Dec 06 02:16:51 2007] [notice] child pid 22461 exit signal Segmentation fault (11)
### End Log

Colin

Reply via email to