develooper Front page | perl.perl5.porters | Postings from June 2009

Re: [PATCH] Re: 5.10.0 regressions that need fixing

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
June 21, 2009 04:54
Subject:
Re: [PATCH] Re: 5.10.0 regressions that need fixing
Message ID:
b77c1dce0906210454r14a94776t1cc278e77e4d4ef9@mail.gmail.com
2009/1/5 Ben Morrow <ben@morrow.me.uk>:
> Quoth davem@iabyn.com (Dave Mitchell):
>>
>> Date: Tue, 02 Sep 2008 12:33:34 -0700
>> Subject: [perl #58530] Bus error with constant + overload + stash manipulation
>>         + bless
>>
>>     Appears to be a 5.8.8 regression. fails on maint + bleed
>
> The test case in the bug report is equivalent to
>
>    sub foo { 1 }
>    use overload q/""/ => \&foo;
>    delete $main::{foo};
>    bless [];
>
> and deleting stashes has always been able to produce segfaults; for
> instance,
>
>    use Devel::Peek;
>    my $x = \&{"foo"};
>    delete $main::{foo};
>    Dump $x;
>
> which has segfaulted since at least 5.6. I don't really understand why
> overloading didn't tickle this under 5.8--I suspect the glob was being
> kept around when it shouldn't have been--but in any case the attached
> patches fix most of this class of segfaults by making a sub CvANON when
> its stash entry gets deleted.
>
> The first is the fix, which requires regen_headers; the second is the
> output of regen_headers; the third is the test cases. Clearing or
> deleting an entire stash will still leave any anon subs in that stash
> prone to causing segfaults, but I don't see any way of finding them.
> I've included TODO tests anyway... :).

Thanks, I've applied :
1. the test patch as d018fae575c7e183deffddccedc84f1f5d7ddacb
2. the code change as f1c32fec87699aee2eeb638f44135f21217d2127
3. regeneration of headers + compilation fix to get it working with a
threaded perl as 4fec321675757b1adbfc9b8317737404d211664f

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