perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject Re: perl-blead@26517 mp2's test suite fails
Date Wed, 18 Jan 2006 00:30:20 GMT
Philip M. Gollucci wrote:
> Stas Bekman wrote:
>> Sweet, so I guess that recent change needs more work and hopefully the
>> local_env test can be changed to reproduce this problem before fixing it.
> I'm guessing that
> {
>   local %ENV;
> }
> reuse %ENV here will fail
> should do that trick... gozer would probably know better though.

I've investigated this issue some, and it's not that simple. Our overloaded %ENV
magic implementation is most certainly busted at this point. For example:

 	local %ENV = (FOO => 1, BAR => 2);

In the block, after localization, all is as would be expected, both %ENV
and $r->subprocess_env are the same (FOO=>1, BAR=>1). Once the localized
block is left however, %ENV is back to normal, but $r->subprocess_env still
contains FOO & BAR, as well as the contents of the original %ENV.

%ENV = (FOO => 1, BAR => 2);
	local %ENV;

In this case, %ENV is correctly (FOO => 1, BAR => 2) initially, then it becomes
empty () in the localized block, but remains that way even after the block is

So, I think the original report that local %ENV causes segfaults is only the
tip of the iceberg ;-( Seems our handling of localization of %ENV is mostly

It's going to take me a bit more time to figure it all out, so for now, I've
disabled the local_env test until I can come up with the correct solution.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

View raw message