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

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

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 10, 2008 15:09
Subject:
Re: my $foo = "bar" if $baz;
Message ID:
20080710220936.GC4997@iabyn.com
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About