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

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

From:
Father Chrysostomos via RT
Date:
October 28, 2012 14:43
Subject:
[perl #77300] [META] Regressions introduced by refactoring
Message ID:
rt-3.6.HEAD-17500-1351460598-1084.77300-15-0@perl.org
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
https://rt.perl.org:443/rt3/Ticket/Display.html?id=77300



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About