perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <steve....@uk.radan.com>
Subject Re: [PATCH] Check AV* is not NULL before calling av_undef()
Date Thu, 05 Jul 2007 08:22:42 GMT
Philippe M. Chiasson wrote:
> Steve Hay wrote:
>> The attached patch stops mod_perl-1.x from calling av_undef() on a NULL AV*.
> 
> Applied, built and tested just fine on my side.
> 
> Only minor comment would be to consider writing a macro around this to
> avoid duplicating the code.
> 
> #define MP_safe_av_undef(av)
> 
> Or something like that.

OK, how about the attached patch instead?


> 
> For bonus points, only enable the workaround for affected versions of perl
> and fallback to the original av_undef() otherwise.

That's not so easy because it isn't easy to tell what versions of perl 
are affected. We could check for perls >= 5.9.5, but that would wrongly 
include most versions of bleadperl kicking around between the release of 
5.9.4 and the application of change #26513 (not a big problem), and 
would also wrongly not include any future 5.8.x releases that change 
#26513 might get integrated into. It doesn't seem to me like being worth 
the trouble.

The change works fine with older perls, in which av_undef(NULL) is 
basically just a no-op anyway.

-- 

Mime
View raw message