develooper Front page | perl.perl5.porters | Postings from October 2012

[perl #77300] [META] Regressions introduced by refactoring

Father Chrysostomos via RT
October 28, 2012 14:43
[perl #77300] [META] Regressions introduced by refactoring
Message ID:
Commit b9ad13acb omitted a break; in sv_upgrade, resulting in an
assertion failure in ‘$x = 1.1; $x = ${qr//}’ fixed by 12c45b2548.

It also set SvSTASH to null in reg_temp_copy, resulting in a crash for:

    bless \$x;
    $x = ${qr//}; # SvOBJECT set, but no SvSTASH
    print \$x;    # crash

Commit 703c388dc did the same thing with SvMAGIC, causing $!=${qr//} to
clobber magic.

Those last two issue were fixed by 78a84e43f7c2.

Those two commits were not just regressions, but bug fixes.  However,
they were both part of larger refactoring (fixing bugs introduced
earlier in the same refactoring) to make regexps first-class SVs.

f082678508 caused this to leak the PV:

    $x = "hello"; $x = ${qr//}

That was likewise a bug fix, but still part of a larger refactoring.

I fixed that in edd9fea2b8b.


Father Chrysostomos

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About