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, > > BramThread Previous | Thread Next