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

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

Thread Previous | Thread Next
From:
Bram
Date:
August 19, 2010 11:38
Subject:
[PATCH] [perl #72922]: Add tests for 72922.
Message ID:
20100819203809.9td8xdwgm8gk4ogk@horde.wizbit.be
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