Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Re: How to debug bizarre memory corruption in mod_perl

Stephen Clouse

2008-07-09

Replies: Find Java Web Hosting

Author LoginPost Reply
Well, thank you for your advice, gentlemen.  It got me on the right track, and I did manage to figure out the issue today.  You may or may not be surprised to find it was this:

my $foo = "bar" if $baz;

Apparently one of the previous programmers left about 100 such constructs littered about the Perl and Mason code.  Fixing them cleared up all the bizarre issues.

We had Perl::Critic for the Perl side of the app, and I've done some hacks to criticize the Mason code, but someone had disabled the ProhibitConditionalDeclarations policy.  *facepalm*

It's interesting that this didn't manifest under Perl 5.8.  Not sure if it's worth trying to develop a test case, since my...if falls into the "never do this" category anyway.

--
Stephen Clouse <stephenclouse@gmail.com>
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.