develooper Front page | perl.perl5.porters | Postings from July 2008

Re: my $foo = "bar" if $baz;

Thread Previous | Thread Next
Dave Mitchell
July 10, 2008 15:09
Re: my $foo = "bar" if $baz;
Message ID:
On Thu, Jul 10, 2008 at 05:56:08PM +0100, Andy Armstrong wrote:
> There's a thread[1] on the mod_perl mailing list at the moment which  
> suggests[2] that
> my $foo = "bar" if $baz;
> is causing memory corruption with mod_perl on 5.10.0. On 5.8.8 the same 
> code worked fine.
> It's understood that it's a bad idea but it doesn't seem great that it  
> can screw things so badly. Is this a known problem with 5.10?

I'm not aware of any such problem.

The diagnosis may be a red herring; removing the statement modifiers
may have simply changed the execution in such a way that the corruption
(elsewhere) was no longer triggered.

Difficult to comment further without a test case. Or perhaps you could
suggest to the OP that he run his prog under valgrind?

"Procrastination grows to fill the available time"
    -- Mitchell's corollary to Parkinson's Law

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About