develooper Front page | perl.perl5.porters | Postings from September 2010

Re: [PATCH] [perl #72922]: Add tests for 72922.

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
September 13, 2010 05:38
Subject:
Re: [PATCH] [perl #72922]: Add tests for 72922.
Message ID:
AANLkTimcGaZup9JQm5UW2fE3iFtMsjHtabEB9wLLj+c1@mail.gmail.com
Thanks, applied to bleadperl. Hoping it's portable, the smokes will tell !

On 19 August 2010 20:38, Bram <p5p@perl.wizbit.be> wrote:
> Resend of original patch which was never applied.
> The bug was fixed by Nicholas on 18th February.
>
> Best regards,
>
> Bram
> On Sat, 27 Feb 2010 23:57:12 +0100, Bram <p5p@perl.wizbit.be> wrote:
>
>> Attached is a patch that adds test for [perl #72922] which was already
>> fixed by Nicholas.
>>
>> Example when the code crashed:
>>    my $re1 = qr/foo/;
>>    my $re2 = $re1;
>>    weaken($re2);
>>    my $re3 = qr/$re1/;
>>
>> What happened was that $re3 is a copy from $re1 which included the
>> magic from $re1. (The magic of $re1 has a back-reference to $re2.)
>>
>>
>> This patch uses runperl because the test script (on a broken perl)
>> results in double free's and/or segfaults.
>>
>> In the test 3 things are checked:
>> a) that it does not crash;
>> b) that the 'value' of the regex remains intact;
>> c) that the refcounts behave as expected;
>>
>>
>> Best regards,
>>
>> Bram
>
>
>
>

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